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

[auto-merge] branch-25.02 to branch-25.04 [skip ci] [bot] #12065

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

nvauto
Copy link
Collaborator

@nvauto nvauto commented Feb 5, 2025

auto-merge triggered by github actions on branch-25.02 to create a PR keeping branch-25.04 up-to-date. If this PR is unable to be merged due to conflicts, it will remain open until manually fix.

…cks] (#12060)

This PR fixes #11433 .

This PR makes the GPU Parquet reader more flexible when handling files
whose decimal columns have a different precision/scale than Spark’s
requested schema. Previously, the plugin’s code would fail early
(“Parquet column cannot be converted”) if the file declared, for
example, DECIMAL(20, 0) but Spark asked for DECIMAL(10, 0) or DECIMAL(5,
1). Now we defer these mismatches to be resolved with optional half-up
rounding or overflow handling trying to match standard Spark behavior.

In this PR, we make castDecimalToDecimal as public function. In
`evolveSchemaCasts`, we pass the from and to DecimalTypes to cast the
decimals to the required form. castDecimalToDecimal will handle the case
of widening the scale/precisions or narrowing of scale/precisions.

Updated the current integration tests. 
In Spark-UT we are disabling the test as the Apache Spark vectorized
path throws error where as the spark-rapids implementation produces the
correct results.

---------

Signed-off-by: Niranjan Artal <nartal@nvidia.com>
@nvauto nvauto merged commit 91fb12d into branch-25.04 Feb 5, 2025
@nvauto
Copy link
Collaborator Author

nvauto commented Feb 5, 2025

SUCCESS - auto-merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants