Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stop using copyWithBooleanColumnAsValidity [databricks] #11418

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ object GpuOrcScan {
withResource(overflowFlags) { _ =>
// This is an integer type so we don't have to worry about
// nested DTypes here.
withResource(Scalar.fromNull(toType)) { NULL =>
overflowFlags.ifElse(casted, NULL)
withResource(Scalar.fromNull(toType)) { nullVal =>
overflowFlags.ifElse(casted, nullVal)
}
}
}
Expand Down Expand Up @@ -338,8 +338,8 @@ object GpuOrcScan {
// next convert to long,
// then down cast long to the target integral type.
val longDoubles = withResource(doubleCanFitInLong(col)) { fitLongs =>
withResource(Scalar.fromNull(fromDt)) { NULL =>
fitLongs.ifElse(col, NULL)
withResource(Scalar.fromNull(fromDt)) { nullVal =>
fitLongs.ifElse(col, nullVal)
}
}
withResource(longDoubles) { _ =>
Expand Down Expand Up @@ -394,7 +394,9 @@ object GpuOrcScan {
withResource(doubleMillis.add(half)) { doubleMillisPlusHalf =>
withResource(doubleMillisPlusHalf.floor()) { millis =>
withResource(getOverflowFlags(doubleMillis, millis)) { overflowFlags =>
millis.copyWithBooleanColumnAsValidity(overflowFlags)
withResource(Scalar.fromNull(millis.getType)) { nullVal =>
overflowFlags.ifElse(millis, nullVal)
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ case class GpuArrayContains(left: Expression, right: Expression)
containsResult.or(_)
}
withResource(containsKeyOrNotContainsNull) { lcnn =>
withResource(Scalar.fromNull(DType.BOOL8)) { NULL =>
lcnn.ifElse(containsResult, NULL)
withResource(Scalar.fromNull(DType.BOOL8)) { nullVal =>
lcnn.ifElse(containsResult, nullVal)
}
}
}
Expand Down
Loading