Skip to content

Commit

Permalink
Fix spark330 build due to removal of isElementAt parameter from mapKe…
Browse files Browse the repository at this point in the history
…yNotExistError (#5296)

Signed-off-by: Jason Lowe <jlowe@nvidia.com>
  • Loading branch information
jlowe authored Apr 21, 2022
1 parent 04b8ea9 commit 80ad204
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ object RapidsErrorUtils {

def mapKeyNotExistError(
key: String,
isElementAtFunction: Boolean = false,
origin: Origin): NoSuchElementException = {
// Follow the Spark string format before 3.3.0
new NoSuchElementException(s"Key $key does not exist.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ object RapidsErrorUtils {

def mapKeyNotExistError(
key: String,
isElementAtFunction: Boolean,
origin: Origin): NoSuchElementException = {
// Follow the Spark string format before 3.3.0
new NoSuchElementException(s"Key $key does not exist.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ object RapidsErrorUtils {

def mapKeyNotExistError(
key: String,
isElementAtFunction: Boolean,
origin: Origin): NoSuchElementException = {
// For now, the default argument is false. The caller sets the correct value accordingly.
QueryExecutionErrors.mapKeyNotExistError(key)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ object RapidsErrorUtils {

def mapKeyNotExistError(
key: String,
isElementAtFunction: Boolean,
origin: Origin): NoSuchElementException = {
// For now, the default argument is false. The caller sets the correct value accordingly.
QueryExecutionErrors.mapKeyNotExistError(key, isElementAtFunction, origin.context)
QueryExecutionErrors.mapKeyNotExistError(key, origin.context)
}

def sqlArrayIndexNotStartAtOneError(): ArrayIndexOutOfBoundsException = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,7 @@ case class GpuElementAt(left: Expression, right: Expression, failOnError: Boolea
if (!exist.isValid || exist.getBoolean) {
map.getMapValue(key)
} else {
throw RapidsErrorUtils.mapKeyNotExistError(keyS.getValue.toString,
isElementAtFunction = true, origin)
throw RapidsErrorUtils.mapKeyNotExistError(keyS.getValue.toString, origin)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ case class GpuGetMapValue(child: Expression, key: Expression, failOnError: Boole
withResource(lhs.getBase.getMapKeyExistence(rhs.getBase)) { keyExistenceColumn =>
withResource(keyExistenceColumn.all) { exist =>
if (exist.isValid && !exist.getBoolean) {
throw RapidsErrorUtils.mapKeyNotExistError(rhs.getValue.toString,
isElementAtFunction = false, origin)
throw RapidsErrorUtils.mapKeyNotExistError(rhs.getValue.toString, origin)
}
}
}
Expand Down

0 comments on commit 80ad204

Please sign in to comment.