-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-12575][SQL] Grammar parity with existing SQL parser #10745
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
Closed
Closed
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
c15ae29
Enable Expression Parsing in CatalysQl
hvanhovell cd7f8ec
Enable Expression Parsing in CatalysQl
hvanhovell 682df13
Merge remote-tracking branch 'spark/master' into SPARK-12576
hvanhovell 7f37d81
Add tests
hvanhovell c2b35b7
Fix a few parser bugs. Address rxin's comments.
hvanhovell b070bf9
Fix HIveQlSuite
hvanhovell bc0e298
Make name more consistent. Remove dead clause.
hvanhovell 17d6da0
Replace existing SQL parser with the new Parser
hvanhovell ebe7d90
Merge remote-tracking branch 'spark/master' into SPARK-12575-2
hvanhovell 5b19b8a
Merge remote-tracking branch 'spark/master' into SPARK-12575-2
hvanhovell e1de29f
Change tests using Approximate
hvanhovell d5c2898
Align CatalystQl behavior with the old SparkSQLParser.
hvanhovell 3111ffb
Merge remote-tracking branch 'spark/master' into SPARK-12576
hvanhovell beb5ca0
Comment string improvement.
hvanhovell 0592b8d
Merge branch 'SPARK-12576' into SPARK-12575-2
hvanhovell 9a3d716
Merge remote-tracking branch 'spark/master' into SPARK-12575-2
hvanhovell 3f73287
Fix nested unary expressions.
hvanhovell 514ba3b
Add Long type
hvanhovell ea01c5a
Do not use keywords in query/
hvanhovell 155aa44
Identifier names cannot start with an _ in order to avoid confusion w…
hvanhovell 67b1386
Remove charset literal. Improve interval handling.
hvanhovell 02dc7dd
Make tests pass. Improve integration.
hvanhovell 5eea11d
Merge remote-tracking branch 'spark/master' into SPARK-12575-2
hvanhovell 179c5d9
Style
hvanhovell 2b6a876
Revert visibility of parse method.
hvanhovell 8ea9865
Fix bug, and remove some not-yet-used functionality from the parser.
hvanhovell e8c0813
Fix python test.
hvanhovell 7e31ee8
Remove CharSet literal. Change Decimal default to Double. Improve exp…
hvanhovell 5aa780f
Revert inputTypes change in HyperLogLogPlusPlus
hvanhovell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -206,11 +206,8 @@ tableName | |
| @init { gParent.pushMsg("table name", state); } | ||
| @after { gParent.popMsg(state); } | ||
| : | ||
| db=identifier DOT tab=identifier | ||
| -> ^(TOK_TABNAME $db $tab) | ||
| | | ||
| tab=identifier | ||
| -> ^(TOK_TABNAME $tab) | ||
| id1=identifier (DOT id2=identifier)? | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is this change?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They are semantically equal. The old one is a bit longer. That is all. |
||
| -> ^(TOK_TABNAME $id1 $id2?) | ||
| ; | ||
|
|
||
| viewName | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
are these copied from hive?
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.
No this is what was supported in the old SqlParser.
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.
are you trying to support both hive's and our interval literal grammar?
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.
Hive does not support multi time unit interval, such as:
1 year 3 month 10 millisecondsThere 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.
In this case I am trying to do support both. Our interval grammar can be seen as an extention to hive's interval grammar.
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.
+1 on supporting both. actually we have to here.