-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-30125][SQL] Remove PostgreSQL dialect #26763
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 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
92e459b
Revert "[SPARK-29951][SQL] Make the behavior of Postgre dialect indep…
xuanyuanking 8c32f6d
Revert "[SPARK-29837][SQL] PostgreSQL dialect: cast to boolean"
xuanyuanking 848745f
Revert "[SPARK-29807][SQL] Rename "spark.sql.ansi.enabled" to "spark.…
xuanyuanking f0674e3
Revert "[SPARK-29364][SQL] Return an interval from date subtract acco…
xuanyuanking 8768937
Revert "[SPARK-28997][SQL] Add `spark.sql.dialect`"
xuanyuanking 94da433
Revert "[SPARK-27931][SQL] Accept "true", "yes", "1", "false", "no", …
xuanyuanking 9638331
Revert "[SPARK-28395][SQL] Division operator support integral division"
xuanyuanking c0da746
fix
xuanyuanking f90f3b1
Revert "[SPARK-28343][FOLLOW-UP][SQL][TEST] Enable spark.sql.function…
xuanyuanking 8e7e887
fix SQLQueryTestSuite for the revert, mainly related with int div int
xuanyuanking c50130a
fix ThriftServerQueryTestSuite
xuanyuanking cf2bc65
[SPARK-29364][SQL] Return an interval from date subtract according to…
MaxGekk 1f90047
[SPARK-29951][SQL] Make the behavior of Postgre dialect independent o…
xuanyuanking cc14274
fix
xuanyuanking 6d978c6
fix unnecessary change
xuanyuanking 17a3c77
address comment from Wenchen
xuanyuanking 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
Next
Next commit
Revert "[SPARK-29951][SQL] Make the behavior of Postgre dialect indep…
…endent of ansi mode config" This reverts commit 23b3c4f.
- Loading branch information
commit 92e459baaccec2d3d211ae8f6a1042df80b4f270
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,9 +58,9 @@ grammar SqlBase; | |
| } | ||
|
|
||
| /** | ||
| * When true, the behavior of keywords follows ANSI SQL standard. | ||
| * When true, ANSI SQL parsing mode is enabled. | ||
| */ | ||
| public boolean SQL_standard_keyword_behavior = false; | ||
| public boolean ansi = false; | ||
| } | ||
|
|
||
| singleStatement | ||
|
|
@@ -766,7 +766,7 @@ primaryExpression | |
| | qualifiedName '.' ASTERISK #star | ||
| | '(' namedExpression (',' namedExpression)+ ')' #rowConstructor | ||
| | '(' query ')' #subqueryExpression | ||
| | functionName '(' (setQuantifier? argument+=expression (',' argument+=expression)*)? ')' | ||
| | qualifiedName '(' (setQuantifier? argument+=expression (',' argument+=expression)*)? ')' | ||
| (OVER windowSpec)? #functionCall | ||
| | identifier '->' expression #lambda | ||
| | '(' identifier (',' identifier)+ ')' '->' expression #lambda | ||
|
|
@@ -810,7 +810,7 @@ booleanValue | |
|
|
||
| interval | ||
| : INTERVAL (errorCapturingMultiUnitsInterval | errorCapturingUnitToUnitInterval)? | ||
| | {SQL_standard_keyword_behavior}? (errorCapturingMultiUnitsInterval | errorCapturingUnitToUnitInterval) | ||
| | {ansi}? (errorCapturingMultiUnitsInterval | errorCapturingUnitToUnitInterval) | ||
| ; | ||
|
|
||
| errorCapturingMultiUnitsInterval | ||
|
|
@@ -930,12 +930,6 @@ qualifiedNameList | |
| : qualifiedName (',' qualifiedName)* | ||
| ; | ||
|
|
||
| functionName | ||
|
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. this is for ANSI-compliant, not pgsql dialect, we should keep it.
Member
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. ditto |
||
| : qualifiedName | ||
| | LEFT | ||
| | RIGHT | ||
| ; | ||
|
|
||
| qualifiedName | ||
| : identifier ('.' identifier)* | ||
| ; | ||
|
|
@@ -955,14 +949,14 @@ errorCapturingIdentifierExtra | |
|
|
||
| identifier | ||
| : strictIdentifier | ||
| | {!SQL_standard_keyword_behavior}? strictNonReserved | ||
| | {!ansi}? strictNonReserved | ||
| ; | ||
|
|
||
| strictIdentifier | ||
| : IDENTIFIER #unquotedIdentifier | ||
| | quotedIdentifier #quotedIdentifierAlternative | ||
| | {SQL_standard_keyword_behavior}? ansiNonReserved #unquotedIdentifier | ||
| | {!SQL_standard_keyword_behavior}? nonReserved #unquotedIdentifier | ||
| | {ansi}? ansiNonReserved #unquotedIdentifier | ||
| | {!ansi}? nonReserved #unquotedIdentifier | ||
| ; | ||
|
|
||
| quotedIdentifier | ||
|
|
@@ -981,7 +975,7 @@ number | |
| | MINUS? BIGDECIMAL_LITERAL #bigDecimalLiteral | ||
| ; | ||
|
|
||
| // When `SQL_standard_keyword_behavior=true`, there are 2 kinds of keywords in Spark SQL. | ||
| // When `spark.sql.dialect.spark.ansi.enabled=true`, there are 2 kinds of keywords in Spark SQL. | ||
| // - Reserved keywords: | ||
| // Keywords that are reserved and can't be used as identifiers for table, view, column, | ||
| // function, alias, etc. | ||
|
|
@@ -1181,9 +1175,9 @@ ansiNonReserved | |
| | YEARS | ||
| ; | ||
|
|
||
| // When `SQL_standard_keyword_behavior=false`, there are 2 kinds of keywords in Spark SQL. | ||
| // When `spark.sql.dialect.spark.ansi.enabled=false`, there are 2 kinds of keywords in Spark SQL. | ||
| // - Non-reserved keywords: | ||
| // Same definition as the one when `SQL_standard_keyword_behavior=true`. | ||
| // Same definition as the one when `spark.sql.dialect.spark.ansi.enabled=true`. | ||
| // - Strict-non-reserved keywords: | ||
| // A strict version of non-reserved keywords, which can not be used as table alias. | ||
| // You can find the full keywords list by searching "Start of the keywords list" in this file. | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.