sqlglot.dialects.druid
class
Druid(sqlglot.dialects.dialect.Dialect):
Parser =
<class 'sqlglot.parsers.druid.DruidParser'>
Generator =
<class 'sqlglot.generators.druid.DruidGenerator'>
STRINGS_SUPPORT_ESCAPED_SEQUENCES: bool =
False
Whether string literals support escape sequences (e.g. \n). Set by the metaclass based on the tokenizer's STRING_ESCAPES.
BYTE_STRINGS_SUPPORT_ESCAPED_SEQUENCES: bool =
False
Whether byte string literals support escape sequences. Set by the metaclass based on the tokenizer's BYTE_STRING_ESCAPES.
parser_class =
<class 'sqlglot.parsers.druid.DruidParser'>
generator_class =
<class 'sqlglot.generators.druid.DruidGenerator'>
INVERSE_TIME_MAPPING: dict[str, str] =
{'%mstrict': '%m', '%dstrict': '%d', '%Hstrict': '%H', '%Istrict': '%I', '%Mstrict': '%M', '%Sstrict': '%S'}
INVERSE_TIME_TRIE: dict =
{'%': {'m': {'s': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'd': {'s': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'H': {'s': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'I': {'s': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'M': {'s': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'S': {'s': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}}}
INVERSE_FORMAT_MAPPING: dict[str, str] =
{'%mstrict': '%m', '%dstrict': '%d', '%Hstrict': '%H', '%Istrict': '%I', '%Mstrict': '%M', '%Sstrict': '%S'}
INVERSE_FORMAT_TRIE: dict =
{'%': {'m': {'s': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'd': {'s': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'H': {'s': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'I': {'s': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'M': {'s': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}, 'S': {'s': {'t': {'r': {'i': {'c': {'t': {0: True}}}}}}}}}
VALID_INTERVAL_UNITS: set[str] =
{'D', 'MILS', 'DECADES', 'MINS', 'DW_ISO', 'MILLISECOND', 'MICROSECOND', 'CENTURIES', 'DAYOFWEEK_ISO', 'YEAR', 'MM', 'USECS', 'MILLENIA', 'MONTH', 'W', 'Y', 'MIL', 'DW', 'HR', 'SECONDS', 'MILLISECONDS', 'DAYOFYEAR', 'CENT', 'TZM', 'Q', 'EPOCH_MICROSECONDS', 'NANOSEC', 'QTR', 'NSEC', 'YY', 'NANOSECS', 'MI', 'CENTS', 'YRS', 'QUARTER', 'NANOSECOND', 'TZH', 'DAY OF YEAR', 'DOW_ISO', 'H', 'DAYOFWEEK', 'SECOND', 'EPOCH_MILLISECONDS', 'WEEKOFYEAR_ISO', 'WEEK', 'TIMEZONE_HOUR', 'MILLENNIUM', 'M', 'MSECOND', 'MILLISECON', 'WOY', 'EPOCH_SECONDS', 'MILLISECS', 'QUARTERS', 'EPOCH_SECOND', 'MILLISEC', 'HOURS', 'WEEK_ISO', 'SECS', 'MINUTE', 'C', 'SEC', 'WEEKDAY_ISO', 'YR', 'MONTHS', 'DECADE', 'HOUR', 'MICROSECS', 'MSECONDS', 'DD', 'MONS', 'WY', 'DAYOFMONTH', 'WEEKDAY', 'MINUTES', 'MICROSECONDS', 'MICROSEC', 'EPOCH_MICROSECOND', 'S', 'NS', 'USECOND', 'HH', 'DAY OF WEEK', 'YEARS', 'MSEC', 'DOW', 'US', 'NSECOND', 'WK', 'WEEKOFYEAR', 'MSECS', 'USECONDS', 'NSECONDS', 'MS', 'MON', 'YYY', 'WEEKISO', 'QTRS', 'DY', 'EPOCH_MILLISECOND', 'DOY', 'EPOCH_NANOSECOND', 'YYYY', 'EPOCH_NANOSECONDS', 'WEEKOFYEARISO', 'HRS', 'EPOCH', 'DAYOFWEEKISO', 'CENTURY', 'TIMEZONE_MINUTE', 'USEC', 'DECS', 'DAY', 'DEC', 'MIN', 'DAYS'}