pan3793 commented on code in PR #7204:
URL: https://github.com/apache/kyuubi/pull/7204#discussion_r2344584755
##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/PrivilegesBuilder.scala:
##########
@@ -100,13 +101,15 @@ object PrivilegesBuilder {
privilegeObjects += PrivilegeObject(table)
case p =>
+ val existsChildOutputHolder =
p.exists(_.isInstanceOf[ChildOutputHolder])
for (child <- p.children) {
// If current plan's references don't have relation to it's input,
have two cases
// 1. `MapInPandas`, `ScriptTransformation`
// 2. `Project` output only have constant value
if (columnPrune(p.references.toSeq ++ p.output, p.inputSet).isEmpty)
{
// If plan is project and output don't have relation to input, can
ignore.
- if (!p.isInstanceOf[Project]) {
+ // If plan tree exists ChildOutputHolder, we should build child
logic plan.
Review Comment:
the variable name `existsChildOutputHolder` explained by itself what it
does, a good comment explains WHY, not WHAT.
--
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]