szehon-ho commented on code in PR #57434:
URL: https://github.com/apache/spark/pull/57434#discussion_r3634698765


##########
sql/api/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseLexer.g4:
##########
@@ -460,6 +461,8 @@ SECOND: 'SECOND';
 SECONDS: 'SECONDS';
 SCHEMA: 'SCHEMA';
 SCHEMAS: 'SCHEMAS';
+SCD_TYPE_1: 'SCD TYPE 1';

Review Comment:
   Follow-up to SPARK-58270: a single-word `SCD` keyword would sidestep the 
one-space limitation entirely -- the lexer would tokenize `SCD`, `TYPE`, and 
the number independently, so any whitespace between them works -- reusing the 
existing `TYPE` and `INTEGER_VALUE` tokens for the rest of the clause. `SCD` 
would then just need to be added to the `nonReserved` / `ansiNonReserved` lists 
so `scd` stays usable as a bare identifier (same reason `HISTORY`/`TRACK` were 
added). Note the current multi-word `SCD_TYPE_1`/`SCD_TYPE_2` entries in those 
lists can never be identifiers, so they don't serve that purpose today.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to