Class BigQuerySqlDialect


  • public class BigQuerySqlDialect
    extends SqlDialect
    A SqlDialect implementation for Google BigQuery's "Standard SQL" dialect.
    • Field Detail

      • RESERVED_KEYWORDS

        private static final java.util.List<java.lang.String> RESERVED_KEYWORDS
      • IDENTIFIER_REGEX

        private static final java.util.regex.Pattern IDENTIFIER_REGEX
        An unquoted BigQuery identifier must start with a letter and be followed by zero or more letters, digits or _.
      • UNION_DISTINCT

        private static final SqlOperator UNION_DISTINCT
        List of BigQuery Specific Operators needed to form Syntactically Correct SQL.
      • EXCEPT_DISTINCT

        private static final SqlSetOperator EXCEPT_DISTINCT
      • INTERSECT_DISTINCT

        private static final SqlSetOperator INTERSECT_DISTINCT
    • Constructor Detail

      • BigQuerySqlDialect

        public BigQuerySqlDialect​(SqlDialect.Context context)
        Creates a BigQuerySqlDialect.
    • Method Detail

      • quoteIdentifier

        public java.lang.String quoteIdentifier​(java.lang.String val)
        Description copied from class: SqlDialect
        Encloses an identifier in quotation marks appropriate for the current SQL dialect.

        For example, quoteIdentifier("emp") yields a string containing "emp" in Oracle, and a string containing [emp] in Access.

        Overrides:
        quoteIdentifier in class SqlDialect
        Parameters:
        val - Identifier to quote
        Returns:
        Quoted identifier
      • identifierNeedsQuote

        protected boolean identifierNeedsQuote​(java.lang.String val)
        Description copied from class: SqlDialect
        Returns whether to quote an identifier. By default, all identifiers are quoted.
        Overrides:
        identifierNeedsQuote in class SqlDialect