-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-3654][SQL] Unifies SQL and HiveQL parsers #2698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
QA tests have started for PR 2698 at commit
|
|
QA tests have finished for PR 2698 at commit
|
|
Test FAILed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although looks trickier, Option[(String, Option[String])] captures the syntax and semantics of SET command better, and simplifies parsing logic.
|
Scala style checking doesn't like the |
|
QA tests have started for PR 2698 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debugging code, forgot to remove this...
|
QA tests have finished for PR 2698 at commit
|
|
Test FAILed. |
|
QA tests have started for PR 2698 at commit
|
|
QA tests have finished for PR 2698 at commit
|
|
Test FAILed. |
|
QA tests have started for PR 2698 at commit
|
|
QA tests have finished for PR 2698 at commit
|
|
Test PASSed. |
|
@marmbrus Please help review. |
|
QA tests have started for PR 2698 at commit
|
|
This PR conflicts with #2678. It would be good to merge that one first, and then I'll rebase. |
|
QA tests have finished for PR 2698 at commit
|
|
Test FAILed. |
|
Can one of the admins verify this patch? |
ba2c121 to
ceada76
Compare
|
QA tests have started for PR 2698 at commit
|
|
QA tests have finished for PR 2698 at commit
|
|
Test PASSed. |
This PR is a follow up of #2590, and tries to introduce a top level SQL parser entry point for all SQL dialects supported by Spark SQL.
A top level parser
SparkSQLParseris introduced to handle the syntaxes that all SQL dialects should recognize (e.g.CACHE TABLE,UNCACHE TABLEandSET, etc.). For all the syntaxes this parser doesn't recognize directly, it fallbacks to a specified function that tries to parse arbitrary input to aLogicalPlan. This function is typically another parser combinator likeSqlParser. DDL syntaxes introduced in #2475 can be moved to here.The
ExtendedHiveQlParsernow only handle Hive specific extensions.Also took the chance to refactor/reformat
SqlParserfor better readability.