ulysses-you commented on a change in pull request #1071:
URL: https://github.com/apache/incubator-kyuubi/pull/1071#discussion_r705832198
##########
File path:
dev/kyuubi-extension-spark-3-1/src/main/scala/org/apache/kyuubi/sql/KyuubiSparkSQLExtension.scala
##########
@@ -36,6 +35,13 @@ class KyuubiSparkSQLExtension extends
(SparkSessionExtensions => Unit) {
extensions.injectParser{ case (_, parser) => new
ZorderSparkSqlExtensionsParser(parser) }
extensions.injectResolutionRule(ResolveZorder)
+ // Note that:
Review comment:
The order is hard code in extension so I think it's safe, and also
checked plan if insert zorder or not:
```
def canInsertZorder(query: LogicalPlan): Boolean = query match {
case Project(_, child) => canInsertZorder(child)
// TODO: actually, we can force zorder even if existed some shuffle
case _: Sort => false
case _: RepartitionByExpression => false
case _: Repartition => false
case _ => true
}
```
We can add some unit test for this method (e.g. the plan top level node is
`RepartitionByExpression`).
--
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]