jzhuge commented on a change in pull request #23848: [SPARK-26946][SQL] 
Identifiers for multi-catalog
URL: https://github.com/apache/spark/pull/23848#discussion_r266189661
 
 

 ##########
 File path: 
sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
 ##########
 @@ -63,6 +63,10 @@ singleTableIdentifier
     : tableIdentifier EOF
     ;
 
+singleMultiPartIdentifier
 
 Review comment:
   When I start to to convert SELECT, INSERT, and DROP code path to support 
multi-catalog, this parse function is needed, e.g,
   ```
     override def visitTable(ctx: TableContext): LogicalPlan = withOrigin(ctx) {
       UnresolvedIdentifier(visitMultiPartIdentifier(ctx.multiPartIdentifier))
     }
   
    override def visitTableName(ctx: TableNameContext): LogicalPlan = 
withOrigin(ctx) {
       val tableId = visitMultiPartIdentifier(ctx.multiPartIdentifier())
       val table = mayApplyAliasPlan(ctx.tableAlias, 
UnresolvedIdentifier(tableId))
       table.optionalMap(ctx.sample)(withSample)
     }
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to