wangyum opened a new pull request #24850: [WIP][SPARK-28020][SQL][TEST] Port 
date.sql
URL: https://github.com/apache/spark/pull/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_BETA1/src/test/regress/sql/date.sql
   
   The expected results can be found in the link: 
https://github.com/postgres/postgres/blob/REL_12_BETA1/src/test/regress/expected/date.out
   
   When porting the test cases, found two PostgreSQL specific features that do 
not exist in Spark SQL:
   
   [SPARK-27898](https://issues.apache.org/jira/browse/SPARK-27898): Support 4 
date operators(date + integer, integer + date, date - integer and date - date)
   [SPARK-28017](https://issues.apache.org/jira/browse/SPARK-28017): Enhance 
EXTRACT/DATE_TRUNC
   
   Also, found a bug:
   [SPARK-28015](https://issues.apache.org/jira/browse/SPARK-28015): Invalid 
date formats should throw an exception
   
   Also, found a inconsistent behavior:
   [SPARK-27923](https://issues.apache.org/jira/browse/SPARK-27923): Invalid 
date throw an exception bug Spark SQL returns `NULL`, for example: 
https://github.com/postgres/postgres/blob/30bcebbdcf23eb8b78e553c4b3b5eb847410ef19/src/test/regress/expected/date.out#L13-L14
   
   ## How was this patch tested?
   
   N/A
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to