Skip to content

Conversation

@wangyum
Copy link
Member

@wangyum wangyum commented Jun 21, 2019

What changes were proposed in this pull request?

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

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

When porting the test cases, found two PostgreSQL specific features that do not exist in Spark SQL:
SPARK-28137: Missing Data Type Formatting Functions
SPARK-28027: Missing some mathematical operators

Also, found three inconsistent behavior:
SPARK-26218: Throw exception on overflow for integers
SPARK-27923: Spark SQL insert bad inputs to NULL
SPARK-28028: Cast numeric to integral type need round
SPARK-2659: HiveQL: Division operator should always perform fractional division, for example:

select 1/2;

How was this patch tested?

N/A

@wangyum wangyum changed the title [SPARK-28059][SQL][TEST] Port int8.sql [SPARK-28136][SQL][TEST] Port int8.sql Jun 21, 2019
@SparkQA
Copy link

SparkQA commented Jun 21, 2019

Test build #106766 has finished for PR 24933 at commit b5981f5.

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

@SparkQA
Copy link

SparkQA commented Jul 9, 2019

Test build #107392 has finished for PR 24933 at commit a4f649f.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member

retest this please

@SparkQA
Copy link

SparkQA commented Jul 9, 2019

Test build #107406 has finished for PR 24933 at commit a4f649f.

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

@dongjoon-hyun
Copy link
Member

dongjoon-hyun commented Jul 10, 2019

I updated the PR description by replacing SPARK-28024 with SPARK-26218. For the PR, you need to update only two lines mentioning JIRA. For the others, this looks good.

In the previous int2.sql PR, I didn't see their comments. Sorry about missing that. Let's proceed this one according to their comments and move forward.

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.
The last commit is only updating comments and I also tested this int8.sql locally.

Thank you, @wangyum and @HyukjinKwon .

@SparkQA
Copy link

SparkQA commented Jul 10, 2019

Test build #107421 has finished for PR 24933 at commit 8b22e1f.

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

@SparkQA
Copy link

SparkQA commented Jul 10, 2019

Test build #107425 has finished for PR 24933 at commit bd3a6c3.

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

@wangyum wangyum deleted the SPARK-28136 branch July 10, 2019 05:50
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.

4 participants