Skip to content

Commit 0c21404

Browse files
wangyumdongjoon-hyun
authored andcommitted
[SPARK-28312][SQL][TEST] Port numeric.sql
## What changes were proposed in this pull request? This PR is to port numeric.sql from PostgreSQL regression tests. https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/sql/numeric.sql The expected results can be found in the link: https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/expected/numeric.out When porting the test cases, found four PostgreSQL specific features that do not exist in Spark SQL: [SPARK-28315](https://issues.apache.org/jira/browse/SPARK-28315): Decimal can not accept `NaN` as input [SPARK-28317](https://issues.apache.org/jira/browse/SPARK-28317): Built-in Mathematical Functions: SCALE [SPARK-28318](https://issues.apache.org/jira/browse/SPARK-28318): Decimal can only support precision up to 38 [SPARK-28322](https://issues.apache.org/jira/browse/SPARK-28322): DIV support decimal type Also, found four inconsistent behavior: [SPARK-28316](https://issues.apache.org/jira/browse/SPARK-28316): Decimal precision issue [SPARK-28324](https://issues.apache.org/jira/browse/SPARK-28324): The LOG function using 10 as the base, but Spark using E [SPARK-27923](https://issues.apache.org/jira/browse/SPARK-27923): Spark SQL insert bad inputs to NULL [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#25092 from wangyum/SPARK-28312. Authored-by: Yuming Wang <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 3776fbd commit 0c21404

File tree

2 files changed

+5928
-0
lines changed

2 files changed

+5928
-0
lines changed

0 commit comments

Comments
 (0)