Class PhoenixSqlDialect

java.lang.Object
org.apache.calcite.sql.SqlDialect
org.apache.calcite.sql.dialect.PhoenixSqlDialect

public class PhoenixSqlDialect extends SqlDialect
A SqlDialect implementation for the Apache Phoenix database.
  • Field Details

  • Constructor Details

    • PhoenixSqlDialect

      public PhoenixSqlDialect(SqlDialect.Context context)
      Creates a PhoenixSqlDialect.
  • Method Details

    • supportsApproxCountDistinct

      public boolean supportsApproxCountDistinct()
      Description copied from class: SqlDialect
      Returns whether this dialect supports APPROX_COUNT_DISTINCT functions.
      Overrides:
      supportsApproxCountDistinct in class SqlDialect
    • supportsCharSet

      public boolean supportsCharSet()
      Description copied from class: SqlDialect
      Returns whether the dialect supports character set names as part of a data type, for instance VARCHAR(30) CHARACTER SET `ISO-8859-1`.
      Overrides:
      supportsCharSet in class SqlDialect
    • getCastSpec

      public @Nullable SqlNode getCastSpec(RelDataType type)
      Description copied from class: SqlDialect
      Returns SqlNode for type in "cast(column as type)", which might be different between databases by type name, precision etc.

      If this method returns null, the cast will be omitted. In the default implementation, this is the case for the NULL type, and therefore CAST(NULL AS <nulltype>) is rendered as NULL.

      Overrides:
      getCastSpec in class SqlDialect