pan3793 commented on code in PR #7551:
URL: https://github.com/apache/kyuubi/pull/7551#discussion_r3556668967
##########
extensions/spark/kyuubi-extension-spark-3-5/src/main/scala/org/apache/kyuubi/sql/InferRebalanceAndSortOrders.scala:
##########
@@ -53,7 +53,16 @@ object InferRebalanceAndSortOrders {
}.toMap
}
- def infer(plan: LogicalPlan): Option[PartitioningAndOrdering] = {
+ def isCheap(e: Expression): Boolean = e match {
Review Comment:
this matches Spark's impl, except for `PythonUDF`, but looks fine
##########
extensions/spark/kyuubi-extension-spark-3-5/src/main/scala/org/apache/kyuubi/sql/KyuubiSQLConf.scala:
##########
@@ -143,6 +143,25 @@ object KyuubiSQLConf {
.booleanConf
.createWithDefault(false)
+ val SKIP_INFER_SORT_ORDERS =
+ buildConf("spark.sql.optimizer.skipInferRebalanceAndSortOrders.enabled")
Review Comment:
the config name looks very confusing, suggestion: use
`spark.sql.optimizer.inferRebalanceAndSortOrders.` as a prefix
- `spark.sql.optimizer.inferRebalanceAndSortOrders.enabled`
- `spark.sql.optimizer.inferRebalanceAndSortOrders.skipSort`
- `spark.sql.optimizer.inferRebalanceAndSortOrders.cheapColumnsOnly`
--
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]