Class Utilities

java.lang.Object
org.apache.drill.exec.util.Utilities

public class Utilities extends Object
  • Field Details

  • 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)
      Create BitControl.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

      public static String getDrillVersion()
      Read the manifest file and get the Drill version number
      Returns:
      The Drill version.
    • isStarQuery

      public static boolean isStarQuery(Collection<SchemaPath> projected)
      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

      public static DrillTable getDrillTable(org.apache.calcite.plan.RelOptTable table)
      Gets DrillTable, either wrapped in RelOptTable, or DrillTranslatableTable.
      Parameters:
      table - table instance
      Returns:
      Drill table
    • convertLiteral

      public static PathSegment convertLiteral(org.apache.calcite.rex.RexLiteral literal)
      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()