Skip to content

Commit

Permalink
add error utils for 3.1 and 3.2
Browse files Browse the repository at this point in the history
Signed-off-by: remzi <13716567376yh@gmail.com>
  • Loading branch information
HaoYang670 committed Jul 20, 2022
1 parent 5a322b2 commit a9b052b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,8 @@ object RapidsErrorUtils {
new ArithmeticException(s"${value.toDebugString} cannot be represented as " +
s"Decimal(${toType.precision}, ${toType.scale}).")
}

def overflowInIntegralDivideError(context: String = ""): ArithmeticException = {
new ArithmeticException("Overflow in integral divide.")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,8 @@ object RapidsErrorUtils {
new ArithmeticException(s"${value.toDebugString} cannot be represented as " +
s"Decimal(${toType.precision}, ${toType.scale}).")
}

def overflowInIntegralDivideError(context: String = ""): ArithmeticException = {
new ArithmeticException("Overflow in integral divide.")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,9 @@ object RapidsErrorUtils {
value, toType.precision, toType.scale
)
}

def overflowInIntegralDivideError(context: String = ""): ArithmeticException = {
QueryExecutionErrors.overflowInIntegralDivideError()
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,8 @@ object RapidsErrorUtils {
value, toType.precision, toType.scale
)
}

def overflowInIntegralDivideError(context: String = ""): ArithmeticException = {
QueryExecutionErrors.overflowInIntegralDivideError()
}
}

0 comments on commit a9b052b

Please sign in to comment.