-
- Downloads
[SPARK-12865][SPARK-12866][SQL] Migrate SparkSQLParser/ExtendedHiveQlParser commands to new Parser
This PR moves all the functionality provided by the SparkSQLParser/ExtendedHiveQlParser to the new Parser hierarchy (SparkQl/HiveQl). This also improves the current SET command parsing: the current implementation swallows ```set role ...``` and ```set autocommit ...``` commands, this PR respects these commands (and passes them on to Hive). This PR and https://github.com/apache/spark/pull/10723 end the use of Parser-Combinator parsers for SQL parsing. As a result we can also remove the ```AbstractSQLParser``` in Catalyst. The PR is marked WIP as long as it doesn't pass all tests. cc rxin viirya winningsix (this touches https://github.com/apache/spark/pull/10144) Author: Herman van Hovell <hvanhovell@questtec.nl> Closes #10905 from hvanhovell/SPARK-12866.
Showing
- sql/catalyst/src/main/antlr3/org/apache/spark/sql/catalyst/parser/ExpressionParser.g 6 additions, 6 deletions...3/org/apache/spark/sql/catalyst/parser/ExpressionParser.g
- sql/catalyst/src/main/antlr3/org/apache/spark/sql/catalyst/parser/SparkSqlLexer.g 5 additions, 0 deletions...tlr3/org/apache/spark/sql/catalyst/parser/SparkSqlLexer.g
- sql/catalyst/src/main/antlr3/org/apache/spark/sql/catalyst/parser/SparkSqlParser.g 53 additions, 9 deletions...lr3/org/apache/spark/sql/catalyst/parser/SparkSqlParser.g
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystQl.scala 22 additions, 0 deletions...main/scala/org/apache/spark/sql/catalyst/CatalystQl.scala
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/ASTNode.scala 10 additions, 4 deletions.../scala/org/apache/spark/sql/catalyst/parser/ASTNode.scala
- sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala 1 addition, 1 deletion...core/src/main/scala/org/apache/spark/sql/SQLContext.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/SparkQl.scala 31 additions, 0 deletions...c/main/scala/org/apache/spark/sql/execution/SparkQl.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSQLParser.scala 0 additions, 124 deletions...scala/org/apache/spark/sql/execution/SparkSQLParser.scala
- sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala 8 additions, 2 deletions...e/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
- sql/hive/src/main/scala/org/apache/spark/sql/hive/ExtendedHiveQlParser.scala 0 additions, 70 deletions...cala/org/apache/spark/sql/hive/ExtendedHiveQlParser.scala
- sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala 4 additions, 4 deletions...rc/main/scala/org/apache/spark/sql/hive/HiveContext.scala
- sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala 13 additions, 5 deletions...ive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala
- sql/hive/src/test/resources/golden/show_functions-1-4a6f611305f58bdbafb2fd89ec62d797 4 additions, 0 deletions.../golden/show_functions-1-4a6f611305f58bdbafb2fd89ec62d797
- sql/hive/src/test/resources/golden/show_functions-2-97cbada21ad9efda7ce9de5891deca7c 1 addition, 0 deletions.../golden/show_functions-2-97cbada21ad9efda7ce9de5891deca7c
- sql/hive/src/test/resources/golden/show_functions-4-4deaa213aff83575bbaf859f79bfdd48 2 additions, 0 deletions.../golden/show_functions-4-4deaa213aff83575bbaf859f79bfdd48
- sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala 1 addition, 1 deletion...a/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala
Loading
Please register or sign in to comment