Package org.apache.drill.exec.util
Class Utilities
java.lang.Object
org.apache.drill.exec.util.Utilities
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PathSegmentconvertLiteral(org.apache.calcite.rex.RexLiteral literal) Converts literal into path segment based on its type.createQueryContextInfo(String defaultSchemaName, String sessionId) CreateBitControl.QueryContextInformationwith given defaultSchemaName.static DrillTablegetDrillTable(org.apache.calcite.plan.RelOptTable table) GetsDrillTable, either wrapped in RelOptTable, or DrillTranslatableTable.static StringRead the manifest file and get the Drill version numberstatic StringgetFileNameForQueryFragment(FragmentContext context, String location, String tag) static booleanisStarQuery(Collection<SchemaPath> projected) Return true if list of schema path has star column.static booleanisStarQuery(org.apache.calcite.rel.type.RelDataType projected) Return true if the row type has star column.static org.apache.calcite.rel.metadata.JaninoRelMetadataProvider
-
Field Details
-
COL_NULL_ERROR
- See Also:
-
-
Constructor Details
-
Utilities
public Utilities()
-
-
Method Details
-
getFileNameForQueryFragment
public static String getFileNameForQueryFragment(FragmentContext context, String location, String tag) -
createQueryContextInfo
public static BitControl.QueryContextInformation createQueryContextInfo(String defaultSchemaName, String sessionId) CreateBitControl.QueryContextInformationwith given defaultSchemaName. Rest of the members of the QueryContextInformation is derived from the current state of the process.- Returns:
- A
BitControl.QueryContextInformationwith given defaultSchemaName.
-
getDrillVersion
Read the manifest file and get the Drill version number- Returns:
- The Drill version.
-
isStarQuery
Return true if list of schema path has star column.- Returns:
- True if the list of
SchemaPaths has star column.
-
isStarQuery
public static boolean isStarQuery(org.apache.calcite.rel.type.RelDataType projected) Return true if the row type has star column. -
getDrillTable
GetsDrillTable, either wrapped in RelOptTable, or DrillTranslatableTable.- Parameters:
table- table instance- Returns:
- Drill table
-
convertLiteral
Converts literal into path segment based on its type. For unsupported types, returns null.- Parameters:
literal- literal- Returns:
- new path segment, null otherwise
-
registerJaninoRelMetadataProvider
public static org.apache.calcite.rel.metadata.JaninoRelMetadataProvider registerJaninoRelMetadataProvider()
-