Skip to content

Conversation

@wangyum
Copy link
Member

@wangyum wangyum commented Jul 17, 2019

What changes were proposed in this pull request?

This PR is to port timestamp.sql from PostgreSQL regression tests. https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/sql/timestamp.sql

The expected results can be found in the link: https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/expected/timestamp.out

When porting the test cases, found five PostgreSQL specific features that do not exist in Spark SQL:
SPARK-28141: Timestamp type can not accept special values
SPARK-28259: Date/Time Output Styles and Date Order Conventions
SPARK-28425: Add more Date/Time Operators
SPARK-28420: Date/Time Functions: date_part
SPARK-28137: Data Type Formatting Functions
SPARK-28432: Date/Time Functions: make_date/make_timestamp

Also, found one inconsistent behavior:
SPARK-27923: Spark SQL insert bad inputs to NULL

How was this patch tested?

N/A

@SparkQA
Copy link

SparkQA commented Jul 17, 2019

Test build #107791 has finished for PR 25181 at commit c4ed0d8.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

-- INSERT INTO TIMESTAMP_TBL VALUES ('Dec 31 17:32:01 2000');
-- INSERT INTO TIMESTAMP_TBL VALUES ('Jan 01 17:32:01 2001');

select * from TIMESTAMP_TBL;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya. I know this is to check the insertion. But, in this case, we don't need this extra one because we have line 152.

@SparkQA
Copy link

SparkQA commented Jul 18, 2019

Test build #107809 has finished for PR 25181 at commit 1c507e5.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Merged to master.
Thank you, @wangyum !

@wangyum wangyum deleted the SPARK-28138 branch July 18, 2019 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants