Snowflake Keyword Compatibility Reference¶
Generated for GSP Java version 4.1.0.8 on 2026-03-15
This page was generated using hybrid static extraction from parser source files combined with runtime validation against the actual GSP parser. Re-run the extraction script after parser updates to keep this page current.
Keyword-as-Column-Name Support¶
As of version 4.1.0.8, the GSP Snowflake parser handles keyword-as-column-name through its grammar rules — a large unreserved_keyword production allows most keywords to be parsed as identifiers in column-name position.
Full Classification Overview¶
Out of 730 keywords recognized by the GSP Snowflake parser:
| Classification | Count | Description |
|---|---|---|
| Allowed | 689 | Can be used as an unquoted column name in both canonical contexts |
| Context-specific | 39 | Fails as SELECT keyword FROM t but works as SELECT t.keyword FROM t |
| Blocked | 2 | Cannot be used as an unquoted column name in either context |
Context-Specific Keywords (39)¶
These keywords fail when used as bare column names (SELECT keyword FROM t) but succeed when table-qualified (SELECT t.keyword FROM t).
| Keyword | Reason |
|---|---|
ALL |
SELECT qualifier |
ARRAY |
Type keyword |
BINARY |
Type keyword |
BIT |
Grammar keyword |
BOOLEAN |
Type keyword |
BYTEINT |
Grammar keyword |
CASE |
Expression keyword |
CHAR |
Type keyword |
CHARACTER |
Type keyword |
CONCURRENTLY |
Grammar keyword |
CONNECT_BY_ROOT |
Grammar keyword |
CROSS |
JOIN keyword |
DECIMAL |
Type keyword |
DISTINCT |
SELECT qualifier |
DOUBLE |
Type keyword |
FLOAT |
Type keyword |
FLOAT4 |
Type keyword |
FLOAT8 |
Type keyword |
FULL |
JOIN keyword |
ILIKE |
Operator keyword |
IS |
Operator keyword |
JOIN |
JOIN keyword |
LIKE |
Operator keyword |
NATURAL |
JOIN keyword |
NOT |
Operator keyword |
NUMERIC |
Type keyword |
OUTER |
JOIN keyword |
OVERLAPS |
Operator keyword |
PRIOR |
Grammar keyword |
REAL |
Type keyword |
REGEXP |
Grammar keyword |
SIMILAR |
Operator keyword |
SMALLINT |
Type keyword |
STRING |
Type keyword |
TINYINT |
Type keyword |
TOP |
SELECT qualifier |
VARBINARY |
Type keyword |
VARCHAR |
Type keyword |
VERBOSE |
Grammar keyword |
Blocked Keywords (2)¶
These keywords cannot be used as unquoted column names in either context.
| Keyword | Workaround |
|---|---|
FROM |
SELECT "from" FROM t |
SET |
SELECT "set" FROM t |
Workaround: Double-Quoted Identifiers¶
For any keyword that fails as an unquoted column name, you can use double-quoted identifiers:
1 2 3 4 5 | |
Scope and Limitations¶
- Tested contexts:
SELECT keyword FROM tandSELECT t.keyword FROM t. Other contexts (DDL column definitions, INSERT column lists, aliases) may behave differently. - Version-specific: This report reflects GSP Java version 4.1.0.8.
- Case sensitivity: Keywords are case-insensitive.
select,SELECT, andSelectare all treated the same.
How to Report Discrepancies¶
If you encounter a keyword that behaves differently from what this page describes, please report it through your support channel. Include:
- The exact SQL statement
- The GSP parser version
- Whether the same SQL works in Snowflake
Methodology¶
- Static extraction: A Python script parses the lexer (
.cod) and grammar (.y) source files to identify all 730 keywords and their grammar classifications. - Runtime validation: A Java test harness validates every classification against actual
TGSqlParserruntime behavior. - JSON dataset: The authoritative data is stored in
docs/generated/snowflake_keyword_compatibility.json.