Repository navigation
Commit 1755de3
committed
fix: follow released Spark for '0e2147483647', and check Spark's error in the sequence test
Review follow-up.
- On the released path, parse_string_to_decimal counts a zero's integral
digits as 1 - scale with a wrapping i32 subtraction, as Spark's int
arithmetic does, so '0e2147483647' casts to 0 there. The zero test covers
it, and two inputs whose counts don't wrap.
- The sequence overflow test's released-Spark branch uses checkSparkError,
which checks Spark's INTERNAL_ERROR, exception class and SQLSTATE rather
than the message.
- The cast audit entry describes SPARK-60118's long digit count: released
Spark throws for '1e2147483647' and similar strings, the fixed releases
return NULL or raise NUMERIC_OUT_OF_SUPPORTED_RANGE, and the native cast's
ANSI error is #7188.
- SparkFixes' scaladoc names the two fixes it covers and points to the
other version checks.1 parent 233f895 commit 1755de3
4 files changed
Lines changed: 21 additions & 15 deletions
File tree
- docs/source/contributor-guide/expression-audits
- native/spark-expr/src/conversion_funcs
- spark/src
- main/scala/org/apache/comet/serde
- test/scala/org/apache/comet
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
710 | 710 | | |
711 | 711 | | |
712 | 712 | | |
713 | | - | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
714 | 716 | | |
715 | | - | |
| 717 | + | |
716 | 718 | | |
717 | 719 | | |
718 | 720 | | |
| |||
2773 | 2775 | | |
2774 | 2776 | | |
2775 | 2777 | | |
2776 | | - | |
2777 | | - | |
| 2778 | + | |
| 2779 | + | |
| 2780 | + | |
2778 | 2781 | | |
2779 | 2782 | | |
2780 | | - | |
| 2783 | + | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
2781 | 2789 | | |
2782 | 2790 | | |
2783 | 2791 | | |
| |||
2793 | 2801 | | |
2794 | 2802 | | |
2795 | 2803 | | |
| 2804 | + | |
| 2805 | + | |
2796 | 2806 | | |
2797 | 2807 | | |
2798 | 2808 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1803 | 1803 | | |
1804 | 1804 | | |
1805 | 1805 | | |
1806 | | - | |
1807 | | - | |
1808 | | - | |
1809 | | - | |
1810 | | - | |
1811 | | - | |
1812 | | - | |
| 1806 | + | |
1813 | 1807 | | |
1814 | 1808 | | |
1815 | 1809 | | |
| |||
0 commit comments