weixiuli commented on a change in pull request #35451:
URL: https://github.com/apache/spark/pull/35451#discussion_r802286270
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/DynamicPartitionPruningSuite.scala
##########
@@ -1482,6 +1482,51 @@ abstract class DynamicPartitionPruningSuiteBase
checkAnswer(df, Row(1150, 1) :: Row(1130, 4) :: Row(1140, 4) :: Nil)
}
}
+
+ test("SPARK-38148: Do not add dynamic partition pruning if there exists
static partition " +
+ "pruning") {
+ withSQLConf(SQLConf.DYNAMIC_PARTITION_PRUNING_ENABLED.key -> "true") {
+ Seq(
+ "f.store_id = 1" -> false,
+ "1 = f.store_id" -> false,
+ "f.store_id <=> 1" -> false,
+ "1 <=> f.store_id" -> false,
+ "f.store_id > 1" -> true,
+ "5 > f.store_id" -> true).foreach { case (condition, withBroadcast) =>
Review comment:
should we add more cases like 'f.store_id <> 1' or 'f.store_id != 1' ?
--
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]