You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/02/26 14:59:10 UTC

[GitHub] viirya commented on a change in pull request #23897: [SPARK-26215][SQL][FOLLOW-UP][MINOR] Fix the warning from ANTR4

viirya commented on a change in pull request #23897: [SPARK-26215][SQL][FOLLOW-UP][MINOR] Fix the warning from ANTR4
URL: https://github.com/apache/spark/pull/23897#discussion_r260323392
 
 

 ##########
 File path: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
 ##########
 @@ -1014,7 +1014,8 @@ SORTED: 'SORTED';
 PURGE: 'PURGE';
 INPUTFORMAT: 'INPUTFORMAT';
 OUTPUTFORMAT: 'OUTPUTFORMAT';
-DATABASE: 'DATABASE' | 'SCHEMA';
+SCHEMA: 'SCHEMA';
+DATABASE: 'DATABASE';
 
 Review comment:
   Previously, token `schema` is synonymous with token `database`.
   
   Won't this change drop support of commands like `CREATE SCHEMA ...`, `ALTER SCHEMA ...`, `DROP SCHEMA ...`?
   
   ```
   scala> sql("create schema test1")
   org.apache.spark.sql.catalyst.parser.ParseException:
   no viable alternative at input 'create schema'(line 1, pos 7)
   
   == SQL ==
   create schema test1
   -------^^^
   
     at org.apache.spark.sql.catalyst.parser.ParseException.withCommand(ParseDriver.scala:243)
     at org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parse(ParseDriver.scala:119)
     at org.apache.spark.sql.execution.SparkSqlParser.parse(SparkSqlParser.scala:48)
     at org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parsePlan(ParseDriver.scala:69)
     at org.apache.spark.sql.SparkSession.$anonfun$sql$1(SparkSession.scala:653)
     at org.apache.spark.sql.catalyst.QueryPlanningTracker.measurePhase(QueryPlanningTracker.scala:111)
     at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:653)
     ... 49 elided
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org