[ https://issues.apache.org/jira/browse/SPARK-34796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17305621#comment-17305621 ]
Apache Spark commented on SPARK-34796: -------------------------------------- User 'c21' has created a pull request for this issue: https://github.com/apache/spark/pull/31911 > Codegen compilation error for query with LIMIT operator and without AQE > ----------------------------------------------------------------------- > > Key: SPARK-34796 > URL: https://issues.apache.org/jira/browse/SPARK-34796 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 3.1.0, 3.2.0, 3.1.1 > Reporter: Cheng Su > Assignee: Cheng Su > Priority: Critical > Fix For: 3.2.0 > > > Example (reproduced in unit test): > > {code:java} > test("failed limit query") { > withTable("left_table", "empty_right_table", "output_table") { > spark.range(5).toDF("k").write.saveAsTable("left_table") > spark.range(0).toDF("k").write.saveAsTable("empty_right_table") > > withSQLConf(SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "false") { > spark.sql("CREATE TABLE output_table (k INT) USING parquet") > spark.sql( > s""" > |INSERT INTO TABLE output_table > |SELECT t1.k FROM left_table t1 > |JOIN empty_right_table t2 > |ON t1.k = t2.k > |LIMIT 3 > |""".stripMargin) > } > } > } > {code} > Result: > > https://gist.github.com/c21/ea760c75b546d903247582be656d9d66 -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org