cloud-fan commented on a change in pull request #31892:
URL: https://github.com/apache/spark/pull/31892#discussion_r597422339
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
##########
@@ -4097,6 +4097,25 @@ class SQLQuerySuite extends QueryTest with
SharedSparkSession with AdaptiveSpark
checkAnswer(df2, Seq(Row(2, 1, 1), Row(4, 2, 2)))
}
}
+
+ test("SPARK-34796: Avoid code-gen compilation error for 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(
+ """
+ |INSERT INTO TABLE output_table
Review comment:
is INSERT necessary to reproduce the bug?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]