KEYWORDS = [
    "ALTER DATABASE",
    "ALTER ENGINE",
    "ALTER TABLE",
    "AND",
    "AS",
    "AS SELECT",
    "ASC",
    "ATTACH ENGINE",
    "AUTO_STOP",
    "CASCADE",
    "CASE",
    "COMPRESSION",
    "COPY",
    "CREATE AGGREGATING INDEX",
    "CREATE AND GENERATE AGGREGATING INDEX",
    "CREATE DATABASE",
    "CREATE DIMENSION TABLE",
    "CREATE ENGINE",
    "CREATE EXTERNAL TABLE",
    "CREATE FACT TABLE",
    "CREATE JOIN INDEX",
    "CREATE VIEW",
    "CREDENTIALS",
    "CSV",
    "DEFAULT",
    "DESC",
    "DESCRIBE",
    "DROP",
    "DROP AGGREGATING INDEX",
    "DROP DATABASE",
    "DROP ENGINE",
    "DROP INDEX",
    "DROP JOIN INDEX",
    "DROP PARTITION",
    "DROP TABLE",
    "DROP VIEW",
    "ELSE",
    "EXPLAIN",
    "EXPLAIN USING JSON",
    "EXPLAIN USING TEXT",
    "FALSE",
    "FILE_NAME_PREFIX",
    "FROM",
    "GROUP BY",
    "GZIP",
    "HAVING",
    "IF",
    "IF EXISTS",
    "IF NOT EXISTS",
    "IN",
    "INCLUDE_QUERY_ID_IN_FILE_NAME",
    "INSERT INTO",
    "JSON",
    "LIMIT",
    "MAX_FILE_SIZE",
    "NONE",
    "NOT NULL",
    "NULL",
    "NULLS FIRST",
    "NULLS LAST",
    "OBJECT_PATTERN",
    "OFFSET",
    "ON",
    "OR",
    "OR REPLACE",
    "ORDER BY",
    "OVERWRITE_EXISTING_FILES",
    "PARQUET",
    "PARTITION",
    "PARTITION BY",
    "PRIMARY INDEX",
    "REFRESH ALL JOIN INDEXES ON TABLE",
    "REFRESH JOIN INDEX",
    "RENAME TO",
    "SCALE",
    "SELECT",
    "SELECT DISTINCT",
    "SET",
    "SHOW CACHE",
    "SHOW COLUMNS",
    "SHOW DATABASES",
    "SHOW ENGINES",
    "SHOW INDEXES",
    "SHOW TABLES",
    "SHOW VIEWS",
    "SINGLE_FILE",
    "SPEC",
    "START ENGINE",
    "STOP ENGINE",
    "THEN",
    "TO",
    "TRUE",
    "TSV",
    "TYPE",
    "UNION",
    "UNIQUE",
    "URL",
    "VALUES",
    "WARMUP",
    "WHERE",
    "WHEN",
    "WITH",
]

FUNCTIONS = [
    "ABS(<val>)",
    "ACOS(<val>)",
    "ALL_MATCH(<array_var> -> <array_var>[<comparison>]<expr>, <array_expr>)",
    "ANY_MATCH(<func>, <arr>)",
    "ANY(<col>)",
    "ANY_VALUE(<col>)",
    "APPROX_PERCENTILE(<expr>,<percent>)",
    "ARRAY_CONCAT(<arr1> [, ...n])",
    "ARRAY_COUNT_GLOBAL(<arr_col>)",
    "ARRAY_COUNT(<func>, <arr>)",
    "ARRAY_CUMULATIVE_SUM( [<func>,] arr)",
    "ARRAY_DISTINCT(<arr>)",
    "ARRAY_FILL(<func>, <arr>)",
    "ARRAY_FIRST_INDEX(<func>, <arr>)",
    "ARRAY_FIRST(<func>, <arr>)",
    "ARRAY_INTERSECT(<arr>)",
    "ARRAY_JOIN(<arr>[, <delimiter>])",
    "ARRAY_MAX_GLOBAL(<arr>)",
    "ARRAY_MAX(<arr>)",
    "ARRAY_MIN_GLOBAL(<arr>)",
    "ARRAY_MIN(<arr>)",
    "ARRAY_REPLACE_BACKWARDS(<func>, <arr>)",
    "ARRAY_REVERSE(<arr>)",
    "ARRAY_SORT([<func>,] <arr>)",
    "ARRAY_SUM_GLOBAL(<arr>)",
    "ARRAY_SUM([<func>,] <arr>)",
    "ARRAY_UNIQ(<arr> [, ...n])",
    "ARRAY_UNNEST(<arr>)",
    "ASIN(<val>)",
    "ATAN(<expr>)",
    "ATAN2(<y_expr>,<x_expr>)",
    "AVG( <val> ) OVER ( [ PARTITION BY <exp> ] )",
    "AVG(<expr>)",
    "BASE64_ENCODE(<expr>)",
    "CAST(<value> AS <type>)",
    "CBRT(<val>)",
    "CEIL(<val>[, <dec>])",
    "CHECKSUM( <expr1> [, <expr2>] [, <expr3>] [, ...<exprN>] )",
    "CITY_HASH(<exp>, [, expr2 [,...]])",
    "COALESCE(<value> [,...])",
    "CONCAT( <string>, <string2>[, ...n] )",
    "CONTAINS(<arr>, <arg>)",
    "COS(<exp>)",
    "COT(<exp>)",
    "COUNT( <val> ) OVER ( [ PARTITION BY <exp> ] )",
    "COUNT([ DISTINCT ] <expr>)",
    "CURRENT_DATE()",
    "DATE_ADD('<unit>', <interval>, <date_expr>)",
    "DATE_DIFF('<unit>', <start_date>, <end_date>)",
    "DATE_FORMAT(<date>, '<format>')",
    "DATE_TRUNC('<precision>', <date>)",
    "DEGREES(<exp>)",
    "DENSE_RANK() OVER ([PARTITION BY <val>] ORDER BY <exp> [ASC|DESC] )",
    "ELEMENT_AT(<arr>, <index>)",
    "EXP(<val>)",
    "EXTRACT_ALL( <expr>, '<regex_pattern>' )",
    "EXTRACT(<field> FROM <source>)",
    "FILTER(<func>, <arr> [, ...n] )",
    "FLATTEN(<arr_of_arrs>)",
    "FLOOR(<val>[, <dec>])",
    "FROM_UNIXTIME(<unix_time>)",
    "GEN_RANDOM_UUID()",
    "IFNULL(<exp1>, <exp2>)",
    "INDEX_OF(<arr>, <x>)",
    "JSON_EXTRACT_ARRAY_RAW(<json>, '<json_pointer_expression>')",
    "JSON_EXTRACT_KEYS(<json>, '<json_pointer_expression>')",
    "JSON_EXTRACT_RAW(<json>, <json_pointer_expression>)",
    "JSON_EXTRACT_VALUES(<json>, '<json_pointer_expression>')",
    "JSON_EXTRACT(<json>, '<json_pointer_expression>', '<expected_type>')",
    "LAG(first_name, 1) OVER (PARTITION BY grade_level ORDER BY first_name )",
    "LEAD(first_name, -1) OVER (PARTITION BY grade_level ORDER BY first_name )",
    "LENGTH(<string>)",
    "LENGTH(<arr>)",
    "LOG([<base>,] <num>)",
    "LOWER(<string>)",
    "LPAD(<str>, <length>[, <pad>])",
    "LTRIM(<target>)",
    "MATCH_ANY(<string>, <pattern_array>)",
    "MATCH(<string>, '<pattern>')",
    "MAX_BY(<arg>, <val>)",
    "MAX( <exp> ) OVER ( [ PARTITION BY <exp> ] )",
    "MAX(<expr>)",
    "MD5_NUMBER_LOWER64(<string>)",
    "MD5_NUMBER_UPPER64(<string>)",
    "MD5(<string>)",
    "MEDIAN(<col>)",
    "MIN_BY(arg, val)",
    "MIN( <exp> ) OVER ( [ PARTITION BY <exp> ] )",
    "MIN(<expr>)",
    "MOD(<num>,<den>)",
    "NEST(<col>)",
    "NOW()",
    "NULLIF(<exp1>, <exp2>)",
    "PI()",
    "POW(<val>, <exp>)",
    "RADIANS(<val>)",
    "RANDOM()",
    "RANK() OVER ([PARTITION BY <exp>] ORDER BY <exp> [ASC|DESC] )",
    "REDUCE(<agg_function>, <arr>)",
    "REGEXP_LIKE(<string>, '<pattern>')",
    "REGEXP_MATCHES(<string>, <pattern>[,'<flag>[...]'])",
    "REPEAT(<string>, <repeating_number>)",
    "REPLACE('hello world','hello','nice')",
    "REVERSE(<string>)",
    "ROUND(<val> [, <dec>])",
    "ROW_NUMBER() OVER ([PARTITION BY <exp>] ORDER BY <exp> [ASC|DESC] )",
    "RPAD(<str>, <length>[, <pad>])",
    "RTRIM(<target>)",
    "SIGN(<expr>)",
    "SIN(<val>)",
    "SLICE(<arr>, <offset>[, <length>])",
    "SPLIT_PART(<string>, <delimiter>, <index>)",
    "SPLIT( <delimiter>, <string> )",
    "SQRT(<val>)",
    "STDDEV_SAMP(<expr>)",
    "STRPOS(<string>, <substring>)",
    "SUBSTR(<string>, <offset> [, <length>])",
    "SUM([DISTINCT] <val> ) OVER ( [ PARTITION BY <expr> ] )",
    "SUM(score)",
    "TAN(<val>)",
    "TIMEZONE()",
    "TO_CHAR(<expr>[, '<format>'])",
    "TO_DATE(<string>)",
    "TO_DAY_OF_WEEK(<date>)",
    "TO_DAY_OF_YEAR(<date>)",
    "TO_DOUBLE(<exp>)",
    "TO_FLOAT(<expr>)",
    "TO_HOUR(<timestamp>)",
    "TO_INT(<exp>)",
    "TO_LONG(<exp>)",
    "TO_MINUTE(<timestamp>)",
    "TO_MONTH(<date>)",
    "TO_QUARTER(<date>)",
    "TO_SECOND(<timestamp>)",
    "TO_STRING(<date>)",
    "TO_TIMESTAMP(<string>)",
    "TO_UNIX_TIMESTAMP(<string>)",
    "TO_UNIXTIME(<string>)",
    "TO_WEEK(<date>)",
    "TO_WEEKISO(<date>)",
    "TO_YEAR(<date>)",
    "TRANSFORM(<func>, <arr>)",
    "TRIM( [LEADING | TRAILING | BOTH] <trim_character> FROM <target_string>)",
    "TRUNC(<val>[, <dec>])",
    "TRY_CAST(<value> AS <type>)",
    "UPPER(<string>)",
    "ZEROIFNULL(<expr>)",
]
