dongjoon-hyun commented on code in PR #49987:
URL: https://github.com/apache/spark/pull/49987#discussion_r1958773406


##########
sql/api/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseParser.g4:
##########
@@ -219,8 +220,8 @@ statement
         ADD (COLUMN | COLUMNS)
         columns=qualifiedColTypeWithPositionList                       
#addTableColumns
     | ALTER TABLE identifierReference
-        ADD (COLUMN | COLUMNS)
-        LEFT_PAREN columns=qualifiedColTypeWithPositionList RIGHT_PAREN 
#addTableColumns
+        ADD (COLUMN | COLUMNS) LEFT_PAREN

Review Comment:
   Is this better? The previous pattern looks easier to read because 
`LEFT_PAREN and RIGHT_PAREN` are in the same line.



##########
sql/api/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseParser.g4:
##########
@@ -101,7 +101,8 @@ conditionValues
     ;
 
 declareHandlerStatement
-    : DECLARE (CONTINUE | EXIT) HANDLER FOR conditionValues 
(beginEndCompoundBlock | statement | setStatementWithOptionalVarKeyword)
+    : DECLARE (CONTINUE | EXIT) HANDLER FOR conditionValues
+       (beginEndCompoundBlock | statement | setStatementWithOptionalVarKeyword)

Review Comment:
   May I ask where this coding guide comes from? IIUC, we don't have a code 
guide for `ANTLR` grammar file?



-- 
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