-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-34436][SQL] DPP support LIKE ANY/ALL expression #31563
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1388,6 +1388,26 @@ abstract class DynamicPartitionPruningSuiteBase | |
checkAnswer(df, Nil) | ||
} | ||
} | ||
|
||
test("SPARK-34436: DPP support LIKE ANY/ALL expression") { | ||
withSQLConf(SQLConf.DYNAMIC_PARTITION_PRUNING_ENABLED.key -> "true") { | ||
val df = sql( | ||
""" | ||
|SELECT date_id, product_id FROM fact_sk f | ||
|JOIN dim_store s | ||
|ON f.store_id = s.store_id WHERE s.country LIKE ANY ('%D%E%', '%A%B%') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about adding more tests for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't have a strong opinion. It's caused by the multi like optimization and any of these 3 can trigger this bug. |
||
""".stripMargin) | ||
|
||
checkPartitionPruningPredicate(df, false, true) | ||
|
||
checkAnswer(df, | ||
Row(1030, 2) :: | ||
Row(1040, 2) :: | ||
Row(1050, 2) :: | ||
Row(1060, 2) :: Nil | ||
) | ||
} | ||
} | ||
} | ||
|
||
class DynamicPartitionPruningSuiteAEOff extends DynamicPartitionPruningSuiteBase { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this is a regression in 3.1 because we introduced this
MultiLikeBase
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. we will simplify
MultiLikeBase
by SPARK-33938.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the fixed version of SPARK-33938 is 3.1.1, so it's a 3.1 regression?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes. I forget 3.1.0.