Package org.apache.drill.exec.util
Class Utilities
java.lang.Object
org.apache.drill.exec.util.Utilities
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PathSegment
convertLiteral
(org.apache.calcite.rex.RexLiteral literal) Converts literal into path segment based on its type.createQueryContextInfo
(String defaultSchemaName, String sessionId) CreateBitControl.QueryContextInformation
with given defaultSchemaName.static DrillTable
getDrillTable
(org.apache.calcite.plan.RelOptTable table) GetsDrillTable
, either wrapped in RelOptTable, or DrillTranslatableTable.static String
Read the manifest file and get the Drill version numberstatic String
getFileNameForQueryFragment
(FragmentContext context, String location, String tag) static boolean
isStarQuery
(Collection<SchemaPath> projected) Return true if list of schema path has star column.static boolean
isStarQuery
(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.QueryContextInformation
with given defaultSchemaName. Rest of the members of the QueryContextInformation is derived from the current state of the process.- Returns:
- A
BitControl.QueryContextInformation
with 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
SchemaPath
s 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()
-