Skip to content
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

[KYUUBI #5780][AUTHZ] Treating PermanentViewMarker as LeafNode make code simple and got correct privilege object #5781

Closed
wants to merge 10 commits into from
Prev Previous commit
Next Next commit
update
AngersZhuuuu committed Nov 27, 2023
commit 04a40c316f6da2bca68638dfbb9fed85aa54f9f9
Original file line number Diff line number Diff line change
@@ -21,13 +21,7 @@ import org.apache.spark.sql.catalyst.catalog.CatalogTable
import org.apache.spark.sql.catalyst.expressions.Attribute
import org.apache.spark.sql.catalyst.plans.logical.{LeafNode, LogicalPlan}

import org.apache.kyuubi.plugin.spark.authz.util.WithInternalChild

case class PermanentViewMarker(child: LogicalPlan, catalogTable: CatalogTable) extends LeafNode
with WithInternalChild {
case class PermanentViewMarker(child: LogicalPlan, catalogTable: CatalogTable) extends LeafNode {

override def output: Seq[Attribute] = child.output

override def withNewChildInternal(newChild: LogicalPlan): LogicalPlan =
copy(child = newChild)
}
Original file line number Diff line number Diff line change
@@ -24,10 +24,6 @@ trait WithInternalChildren {
def withNewChildrenInternal(newChildren: IndexedSeq[LogicalPlan]): LogicalPlan
}

trait WithInternalChild {
def withNewChildInternal(newChild: LogicalPlan): LogicalPlan
}

trait WithInternalExpressionChild {
def withNewChildInternal(newChild: Expression): Expression
}