-
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
[SPARK-29364][SQL] Return an interval from date subtract according to…
… SQL standard Proposed new expression `SubtractDates` which is used in `date1` - `date2`. It has the `INTERVAL` type, and returns the interval from `date1` (inclusive) and `date2` (exclusive). For example: ```sql > select date'tomorrow' - date'yesterday'; interval 2 days ``` Closes #26034 - To conform the SQL standard which states the result type of `date operand 1` - `date operand 2` must be the interval type. See [4.5.3 Operations involving datetimes and intervals](http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt). - Improve Spark SQL UX and allow mixing date and timestamp in subtractions. For example: `select timestamp'now' + (date'2019-10-01' - date'2019-09-15')` Before the query below returns number of days: ```sql spark-sql> select date'2019-10-05' - date'2018-09-01'; 399 ``` After it returns an interval: ```sql spark-sql> select date'2019-10-05' - date'2018-09-01'; interval 1 years 1 months 4 days ``` - by new tests in `DateExpressionsSuite` and `TypeCoercionSuite`. - by existing tests in `date.sql` Closes #26112 from MaxGekk/date-subtract. Authored-by: Maxim Gekk <[email protected]> Signed-off-by: Yuming Wang <[email protected]>
- Loading branch information
commit cf2bc65ec47cfc7db0d8077c41816b2825282461
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
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.