Join GitHub today
[SPARK-28020][SQL][TEST] Port date.sql #24850
What changes were proposed in this pull request?
This PR is to port date.sql from PostgreSQL regression tests. https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/sql/date.sql
The expected results can be found in the link: https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/expected/date.out
When porting the test cases, found four PostgreSQL specific features that do not exist in Spark SQL:
SPARK-28017: Enhance EXTRACT/DATE_TRUNC
Also, found a bug:
Also, found a inconsistent behavior:
How was this patch tested?