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 float8.sql from PostgreSQL regression tests. https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/sql/float8.sql

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

When porting the test cases, found six PostgreSQL specific features that do not exist in Spark SQL:
SPARK-28060: Double type can not accept some special inputs
SPARK-28027: Spark SQL does not support prefix operator @ and |/
SPARK-28061: Support for converting float to binary format
SPARK-23906: Support Truncate number
SPARK-28134: Missing Trigonometric Functions

Also, found two bug:
SPARK-28024: Incorrect value when out of range
SPARK-28135: ceil/ceiling/floor/power returns incorrect values

Also, found four inconsistent behavior:
SPARK-27923: Spark SQL insert bad inputs to NULL
SPARK-28028: Cast numeric to integral type need round
SPARK-27923: Spark SQL returns NULL when dividing by zero
SPARK-28007: Caret operator (^) means bitwise XOR in Spark/Hive and exponentiation in Postgres

How was this patch tested?

N/A

@SparkQA
Copy link

SparkQA commented Jun 21, 2019

Test build #106761 has finished for PR 24931 at commit 46a300e.

  • 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 #107441 has finished for PR 24931 at commit 4b4551f.

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

@wangyum
Copy link
Member Author

wangyum commented Jul 10, 2019

retest this please

@SparkQA
Copy link

SparkQA commented Jul 10, 2019

Test build #107444 has finished for PR 24931 at commit 4b4551f.

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

@dongjoon-hyun
Copy link
Member

Hi, @wangyum .
Since #25041 is merged, could you update this PR once more? Thanks!

@wangyum
Copy link
Member Author

wangyum commented Jul 15, 2019

Thank you @dongjoon-hyun . I will update it later.

@SparkQA
Copy link

SparkQA commented Jul 15, 2019

Test build #107679 has finished for PR 24931 at commit cd5d695.

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

SELECT double('Infinity') + 100.0;
-- [SPARK-27768] Infinity, -Infinity, NaN should be recognized in a case insensitive manner
SELECT double('Infinity') / double('Infinity');
SELECT double('NaN') / double('NaN');
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a comment SPARK-28315 before line 55?

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 (except one minor comment request).
Most differences are filed correctly. Thank you so much, @wangyum .

@SparkQA
Copy link

SparkQA commented Jul 16, 2019

Test build #107713 has finished for PR 24931 at commit 532486a.

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

@SparkQA
Copy link

SparkQA commented Jul 16, 2019

Test build #107721 has finished for PR 24931 at commit f49cf43.

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

@wangyum
Copy link
Member Author

wangyum commented Jul 16, 2019

retest this please

@SparkQA
Copy link

SparkQA commented Jul 16, 2019

Test build #107725 has finished for PR 24931 at commit f49cf43.

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

@HyukjinKwon
Copy link
Member

Merged to master.

@wangyum wangyum deleted the SPARK-28129 branch July 16, 2019 10:36
vinodkc pushed a commit to vinodkc/spark that referenced this pull request Jul 18, 2019
## What changes were proposed in this pull request?

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

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

When porting the test cases, found six PostgreSQL specific features that do not exist in Spark SQL:
[SPARK-28060](https://issues.apache.org/jira/browse/SPARK-28060): Double type can not accept some special inputs
[SPARK-28027](https://issues.apache.org/jira/browse/SPARK-28027): Spark SQL does not support prefix operator `` and `|/`
[SPARK-28061](https://issues.apache.org/jira/browse/SPARK-28061): Support for converting float to binary format
[SPARK-23906](https://issues.apache.org/jira/browse/SPARK-23906): Support Truncate number
[SPARK-28134](https://issues.apache.org/jira/browse/SPARK-28134): Missing Trigonometric Functions

Also, found two bug:
[SPARK-28024](https://issues.apache.org/jira/browse/SPARK-28024): Incorrect value when out of range
[SPARK-28135](https://issues.apache.org/jira/browse/SPARK-28135): ceil/ceiling/floor/power returns incorrect values

Also, found four inconsistent behavior:
[SPARK-27923](https://issues.apache.org/jira/browse/SPARK-27923): Spark SQL insert bad inputs to NULL
[SPARK-28028](https://issues.apache.org/jira/browse/SPARK-28028): Cast numeric to integral type need round
[SPARK-27923](https://issues.apache.org/jira/browse/SPARK-27923): Spark SQL returns NULL when dividing by zero
[SPARK-28007](https://issues.apache.org/jira/browse/SPARK-28007):  Caret operator (^) means bitwise XOR in Spark/Hive and exponentiation in Postgres

## How was this patch tested?

N/A

Closes apache#24931 from wangyum/SPARK-28129.

Authored-by: Yuming Wang <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>
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