Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3426c34
Throw ARITHMETIC_OVERFLOW in MakeYMInterval, MakeDTInterval
gotocoding-DB Nov 6, 2024
908e745
Add another type of exception because we can't use current ARITHMETIC…
gotocoding-DB Nov 6, 2024
b5cd32a
better error message
gotocoding-DB Nov 7, 2024
2fa9f9d
Merge branch 'master' into SPARK-50226-overflow-error
gotocoding-DB Nov 7, 2024
abd4255
fix styletest for error-conditions.json
gotocoding-DB Nov 7, 2024
de44e30
WITH_TRY_SUGGESTION without message
gotocoding-DB Nov 7, 2024
87e3c5c
Merge remote-tracking branch 'upstream/master' into SPARK-50226-overf…
gotocoding-DB Nov 8, 2024
3b94f96
fix tests
gotocoding-DB Nov 8, 2024
d7352a4
Better tests, return back message field because of 'Divide by -1' part
gotocoding-DB Nov 8, 2024
5508b9c
fix tests, regenerate autogenerated files
gotocoding-DB Nov 8, 2024
6a2ed0b
Use another error message types and remove division by -1 text
gotocoding-DB Nov 8, 2024
68594ff
Regenerate expected sql output
gotocoding-DB Nov 8, 2024
30c63f6
Fix tests
gotocoding-DB Nov 8, 2024
8388de2
Enforce setting context
gotocoding-DB Nov 8, 2024
4f72f7e
remove TRY
gotocoding-DB Nov 12, 2024
9ed5eb2
Merge remote-tracking branch 'upstream/master' into SPARK-50226-overf…
gotocoding-DB Nov 12, 2024
494d648
fix PR issues
gotocoding-DB Nov 12, 2024
b042247
recanonize tests
gotocoding-DB Nov 12, 2024
0fcd3cc
fix tests
gotocoding-DB Nov 12, 2024
2925363
add err context
gotocoding-DB Nov 13, 2024
2d84c95
recanonize tests
gotocoding-DB Nov 13, 2024
c2d2490
Merge remote-tracking branch 'upstream/master' into SPARK-50226-overf…
gotocoding-DB Nov 13, 2024
2a36749
fix PR issues
gotocoding-DB Nov 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Regenerate expected sql output
  • Loading branch information
gotocoding-DB committed Nov 8, 2024
commit 68594ff38c1914ea638f4dca6b598abb77c00a17
Original file line number Diff line number Diff line change
Expand Up @@ -2519,8 +2519,7 @@ org.apache.spark.SparkArithmeticException
"errorClass" : "INTERVAL_ARITHMETIC_OVERFLOW.WITH_TRY_SUGGESTION",
"sqlState" : "22015",
"messageParameters" : {
"alternative" : "",
"message" : ""
"functionName" : "try_multiply"
}
}

Expand All @@ -2535,8 +2534,7 @@ org.apache.spark.SparkArithmeticException
"errorClass" : "INTERVAL_ARITHMETIC_OVERFLOW.WITH_TRY_SUGGESTION",
"sqlState" : "22015",
"messageParameters" : {
"alternative" : " Use 'try_subtract' to tolerate overflow and return NULL instead.",
"message" : ""
"functionName" : "try_subtract"
}
}

Expand All @@ -2551,8 +2549,7 @@ org.apache.spark.SparkArithmeticException
"errorClass" : "INTERVAL_ARITHMETIC_OVERFLOW.WITH_TRY_SUGGESTION",
"sqlState" : "22015",
"messageParameters" : {
"alternative" : " Use 'try_add' to tolerate overflow and return NULL instead.",
"message" : ""
"functionName" : "try_add"
}
}

Expand Down Expand Up @@ -2864,8 +2861,7 @@ org.apache.spark.SparkArithmeticException
"errorClass" : "INTERVAL_ARITHMETIC_OVERFLOW.WITH_TRY_SUGGESTION",
"sqlState" : "22015",
"messageParameters" : {
"alternative" : " Use 'try_divide' to tolerate overflow and return NULL instead.",
"message" : "Interval value overflows after being divided by -1"
"functionName" : "try_divide"
},
"queryContext" : [ {
"objectType" : "",
Expand All @@ -2887,8 +2883,7 @@ org.apache.spark.SparkArithmeticException
"errorClass" : "INTERVAL_ARITHMETIC_OVERFLOW.WITH_TRY_SUGGESTION",
"sqlState" : "22015",
"messageParameters" : {
"alternative" : " Use 'try_divide' to tolerate overflow and return NULL instead.",
"message" : "Interval value overflows after being divided by -1"
"functionName" : "try_divide"
},
"queryContext" : [ {
"objectType" : "",
Expand Down Expand Up @@ -2944,8 +2939,7 @@ org.apache.spark.SparkArithmeticException
"errorClass" : "INTERVAL_ARITHMETIC_OVERFLOW.WITH_TRY_SUGGESTION",
"sqlState" : "22015",
"messageParameters" : {
"alternative" : " Use 'try_divide' to tolerate overflow and return NULL instead.",
"message" : "Interval value overflows after being divided by -1"
"functionName" : "try_divide"
},
"queryContext" : [ {
"objectType" : "",
Expand All @@ -2967,8 +2961,7 @@ org.apache.spark.SparkArithmeticException
"errorClass" : "INTERVAL_ARITHMETIC_OVERFLOW.WITH_TRY_SUGGESTION",
"sqlState" : "22015",
"messageParameters" : {
"alternative" : " Use 'try_divide' to tolerate overflow and return NULL instead.",
"message" : "Interval value overflows after being divided by -1"
"functionName" : "try_divide"
},
"queryContext" : [ {
"objectType" : "",
Expand Down
21 changes: 7 additions & 14 deletions sql/core/src/test/resources/sql-tests/results/interval.sql.out
Original file line number Diff line number Diff line change
Expand Up @@ -2342,8 +2342,7 @@ org.apache.spark.SparkArithmeticException
"errorClass" : "INTERVAL_ARITHMETIC_OVERFLOW.WITH_TRY_SUGGESTION",
"sqlState" : "22015",
"messageParameters" : {
"alternative" : "",
"message" : ""
"functionName" : "try_multiply"
}
}

Expand All @@ -2358,8 +2357,7 @@ org.apache.spark.SparkArithmeticException
"errorClass" : "INTERVAL_ARITHMETIC_OVERFLOW.WITH_TRY_SUGGESTION",
"sqlState" : "22015",
"messageParameters" : {
"alternative" : " Use 'try_subtract' to tolerate overflow and return NULL instead.",
"message" : ""
"functionName" : "try_subtract"
}
}

Expand All @@ -2374,8 +2372,7 @@ org.apache.spark.SparkArithmeticException
"errorClass" : "INTERVAL_ARITHMETIC_OVERFLOW.WITH_TRY_SUGGESTION",
"sqlState" : "22015",
"messageParameters" : {
"alternative" : " Use 'try_add' to tolerate overflow and return NULL instead.",
"message" : ""
"functionName" : "try_add"
}
}

Expand Down Expand Up @@ -2687,8 +2684,7 @@ org.apache.spark.SparkArithmeticException
"errorClass" : "INTERVAL_ARITHMETIC_OVERFLOW.WITH_TRY_SUGGESTION",
"sqlState" : "22015",
"messageParameters" : {
"alternative" : " Use 'try_divide' to tolerate overflow and return NULL instead.",
"message" : "Interval value overflows after being divided by -1"
"functionName" : "try_divide"
},
"queryContext" : [ {
"objectType" : "",
Expand All @@ -2710,8 +2706,7 @@ org.apache.spark.SparkArithmeticException
"errorClass" : "INTERVAL_ARITHMETIC_OVERFLOW.WITH_TRY_SUGGESTION",
"sqlState" : "22015",
"messageParameters" : {
"alternative" : " Use 'try_divide' to tolerate overflow and return NULL instead.",
"message" : "Interval value overflows after being divided by -1"
"functionName" : "try_divide"
},
"queryContext" : [ {
"objectType" : "",
Expand Down Expand Up @@ -2767,8 +2762,7 @@ org.apache.spark.SparkArithmeticException
"errorClass" : "INTERVAL_ARITHMETIC_OVERFLOW.WITH_TRY_SUGGESTION",
"sqlState" : "22015",
"messageParameters" : {
"alternative" : " Use 'try_divide' to tolerate overflow and return NULL instead.",
"message" : "Interval value overflows after being divided by -1"
"functionName" : "try_divide"
},
"queryContext" : [ {
"objectType" : "",
Expand All @@ -2790,8 +2784,7 @@ org.apache.spark.SparkArithmeticException
"errorClass" : "INTERVAL_ARITHMETIC_OVERFLOW.WITH_TRY_SUGGESTION",
"sqlState" : "22015",
"messageParameters" : {
"alternative" : " Use 'try_divide' to tolerate overflow and return NULL instead.",
"message" : "Interval value overflows after being divided by -1"
"functionName" : "try_divide"
},
"queryContext" : [ {
"objectType" : "",
Expand Down