wForget commented on code in PR #5079:
URL: https://github.com/apache/kyuubi/pull/5079#discussion_r1270494032
##########
extensions/spark/kyuubi-extension-spark-3-3/src/main/scala/org/apache/kyuubi/sql/RebalanceBeforeWriting.scala:
##########
@@ -27,7 +27,18 @@ trait RepartitionBuilderWithRebalance extends
RepartitionBuilder {
query: LogicalPlan): LogicalPlan = {
if (!conf.getConf(KyuubiSQLConf.INFER_REBALANCE_AND_SORT_ORDERS) ||
dynamicPartitionColumns.nonEmpty) {
- RebalancePartitions(dynamicPartitionColumns, query)
+ // TODO: make configurable
+ val constantConditions = InferDynamicPartitionConstantConditions
+ .infer(dynamicPartitionColumns, query)
Review Comment:
> Each optimization can cause bug, we should trust the code.. and we need a
new config to control the behavior.
Thanks, i will try to implement it.
> I think the key point is that, we should handle the multi-level partition
spec carefully. e.g.,
The following judgment should cover it, I will add more test cases to verify
it.
https://github.com/apache/kyuubi/blob/d1c9f4d935c6e32366eac019b955f72731ecebc4/extensions/spark/kyuubi-extension-spark-3-3/src/main/scala/org/apache/kyuubi/sql/RebalanceBeforeWriting.scala#L34-L35
--
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]