-
Notifications
You must be signed in to change notification settings - Fork 242
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
Add support for computing remainder with Decimal128 operands with more precision on Spark 3.4 [databricks] #8414
Add support for computing remainder with Decimal128 operands with more precision on Spark 3.4 [databricks] #8414
Conversation
… to compute the remainder when overflow can happen with upcasting Signed-off-by: Navin Kumar <[email protected]>
Signed-off-by: Navin Kumar <[email protected]>
…mainder-decimal128-spark340
build |
Investigating Databricks compile failure. Looks unrelated to this branch. |
…mainder-decimal128-spark340
Looks like a new build failure with Databricks 11.3. Will file an issue. |
Blocked until #8460 is resolved |
…mainder-decimal128-spark340
build |
1 similar comment
build |
…mainder-decimal128-spark340
build |
@pytest.mark.parametrize('rhs', [DecimalGen(27,7), DecimalGen(30,10), DecimalGen(38,1), DecimalGen(36,0), DecimalGen(28,-7)], ids=idfn) | ||
def test_mod_mixed_decimal128(lhs, rhs): | ||
assert_gpu_and_cpu_are_equal_collect( | ||
lambda spark : two_col_df(spark, lhs, rhs).selectExpr("a", "b", f"a % b")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: why the format string? f"a % b"
???
…e precision on Spark 3.4 [databricks] (NVIDIA#8414) * Add support for longRemainder which uses custom spark-rapids-jni code to compute the remainder when overflow can happen with upcasting Signed-off-by: Navin Kumar <[email protected]> * remove commented out line of code. Signed-off-by: Navin Kumar <[email protected]> --------- Signed-off-by: Navin Kumar <[email protected]>
Fixes #8330.
Depends on NVIDIA/spark-rapids-jni#1175 being merge first.
This completes #8161 and adds support for computing Remainder w/ Decimal 128 operands where higher precision is required than fits into the DECIMAL128 value. It calls the custom code from the spark-rapids-jni PR when the needed precision for the operands is greater than DECIMAL128_MAX_PRECISION.