Class CompoundIdentifierConverter
java.lang.Object
org.apache.calcite.sql.util.SqlBasicVisitor<org.apache.calcite.sql.SqlNode>
org.apache.calcite.sql.util.SqlShuttle
org.apache.drill.exec.planner.sql.parser.CompoundIdentifierConverter
- All Implemented Interfaces:
org.apache.calcite.sql.util.SqlVisitor<org.apache.calcite.sql.SqlNode>
public class CompoundIdentifierConverter
extends org.apache.calcite.sql.util.SqlShuttle
Implementation of
SqlVisitor that converts bracketed compound SqlIdentifier
to bracket-less compound SqlIdentifier (also known as DrillCompoundIdentifier)
to provide ease of use while querying complex types.
For example, this visitor converts a['b'][4]['c'] to a.b[4].c-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.calcite.sql.util.SqlShuttle
org.apache.calcite.sql.util.SqlShuttle.CallCopyingArgHandlerNested classes/interfaces inherited from class org.apache.calcite.sql.util.SqlBasicVisitor
org.apache.calcite.sql.util.SqlBasicVisitor.ArgHandler<R>, org.apache.calcite.sql.util.SqlBasicVisitor.ArgHandlerImpl<R> -
Constructor Summary
Constructors -
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
-
CompoundIdentifierConverter
public CompoundIdentifierConverter(boolean allowNoTableRefCompoundIdentifier)
-
-
Method Details
-
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
-
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
-