urosstan-db commented on code in PR #58958:
URL: https://github.com/apache/spark/pull/58958#discussion_r4067513475
##########
sql/core/src/test/scala/org/apache/spark/sql/jdbc/v2/JDBCV2JoinPushdownIntegrationSuiteBase.scala:
##########
@@ -299,6 +301,30 @@ trait JDBCV2JoinPushdownIntegrationSuiteBase
}
}
+ gridTest("Join pushdown preserves partitioned input reads")(Seq(1, 2)) {
numPartitions =>
+ val tableOptions = s"""WITH (
+ |'partitionColumn' '${caseConvert("id")}',
+ |'lowerBound' '0',
+ |'upperBound' '11',
+ |'numPartitions' '$numPartitions')""".stripMargin
+ val sqlQuery = s"""
+ |SELECT a.id, b.id
+ |FROM $catalogAndNamespace.$casedJoinTableName1 $tableOptions a
+ |JOIN $catalogAndNamespace.$casedJoinTableName1 $tableOptions b ON a.id
= b.id + 1
+ |""".stripMargin
+
+ val rows = withSQLConf(SQLConf.DATA_SOURCE_V2_JOIN_PUSHDOWN.key ->
"false") {
+ sql(sqlQuery).collect().toSeq
+ }
+ assert(rows.nonEmpty)
Review Comment:
Let's use only join pushdown = true path, assert join is not pushed down,
and assert on entire result
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]