Skip to content

Commit

Permalink
column privilege
Browse files Browse the repository at this point in the history
  • Loading branch information
924060929 committed Mar 3, 2024
1 parent 3f63285 commit 68e1d3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public List<Rule> buildRules() {
logicalSubQueryAlias(logicalSort())
.then(subq -> subq.withChildren(subq.child().child(0)))
),
RuleType.ELIMINATE_ORDER_BY_UNDER_SUBQUERY.build(
RuleType.ELIMINATE_ORDER_BY_UNDER_VIEW.build(
logicalView(logicalSort())
.then(view -> view.withChildren(view.child().child(0)))
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.doris.nereids.trees.plans.logical;

import org.apache.doris.catalog.View;
import org.apache.doris.nereids.exceptions.AnalysisException;
import org.apache.doris.nereids.memo.GroupExpression;
import org.apache.doris.nereids.properties.FdItem;
import org.apache.doris.nereids.properties.FunctionalDependencies;
Expand All @@ -29,7 +30,6 @@
import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor;
import org.apache.doris.nereids.util.Utils;

import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;

Expand All @@ -46,7 +46,9 @@ public class LogicalView<BODY extends Plan> extends LogicalUnary<BODY> {
public LogicalView(View view, BODY body) {
super(PlanType.LOGICAL_VIEW, Optional.empty(), Optional.empty(), body);
this.view = Objects.requireNonNull(view, "catalog can not be null");
Preconditions.checkArgument(body instanceof LogicalPlan);
if (!(body instanceof LogicalPlan)) {
throw new AnalysisException("Child of LogicalView should be LogicalPlan, but meet: " + body.getClass());
}
}

@Override
Expand Down

0 comments on commit 68e1d3d

Please sign in to comment.