Class SqlResourceCollectorShuttle
java.lang.Object
org.apache.calcite.sql.util.SqlBasicVisitor<org.apache.calcite.sql.SqlNode>
org.apache.calcite.sql.util.SqlShuttle
org.apache.druid.sql.calcite.planner.SqlResourceCollectorShuttle
- All Implemented Interfaces:
org.apache.calcite.sql.util.SqlVisitor<org.apache.calcite.sql.SqlNode>
public class SqlResourceCollectorShuttle
extends org.apache.calcite.sql.util.SqlShuttle
Walks an
SqlNode to collect a set of Resource for ResourceType.DATASOURCE and
ResourceType.VIEW to use for authorization during query planning.
It works by looking for SqlIdentifier which correspond to a IdentifierNamespace, where
SqlValidatorNamespace is calcite-speak for sources of data and IdentifierNamespace specifically are
namespaces which are identified by a single variable, e.g. table names.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.calcite.sql.util.SqlShuttle
org.apache.calcite.sql.util.SqlShuttle.CallCopyingArgHandler -
Constructor Summary
ConstructorsConstructorDescriptionSqlResourceCollectorShuttle(org.apache.calcite.sql.validate.SqlValidator validator, PlannerContext plannerContext) -
Method Summary
Methods inherited from class org.apache.calcite.sql.util.SqlShuttle
visit, visit, visit, visit, visitMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.calcite.sql.util.SqlVisitor
visitNode
-
Constructor Details
-
SqlResourceCollectorShuttle
public SqlResourceCollectorShuttle(org.apache.calcite.sql.validate.SqlValidator validator, PlannerContext plannerContext)
-
-
Method Details
-
visit
public org.apache.calcite.sql.SqlNode visit(org.apache.calcite.sql.SqlCall call) - Specified by:
visitin interfaceorg.apache.calcite.sql.util.SqlVisitor<org.apache.calcite.sql.SqlNode>- Overrides:
visitin classorg.apache.calcite.sql.util.SqlShuttle
-
visit
public org.apache.calcite.sql.SqlNode visit(org.apache.calcite.sql.SqlIdentifier id) - Specified by:
visitin interfaceorg.apache.calcite.sql.util.SqlVisitor<org.apache.calcite.sql.SqlNode>- Overrides:
visitin classorg.apache.calcite.sql.util.SqlShuttle
-
getResourceActions
-