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

feat: enable decimal to decimal cast of different precision and scale #1086

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

himadripal
Copy link
Contributor

@himadripal himadripal commented Nov 14, 2024

Which issue does this PR close?

Closes #375

Rationale for this change

What changes are included in this PR?

How are these changes tested?

@himadripal
Copy link
Contributor Author

@andygrove @viirya

@andygrove andygrove changed the title enable decimal to decimal cast of different precision and scale feat: enable decimal to decimal cast of different precision and scale Nov 14, 2024
@@ -895,6 +895,18 @@ class CometCastSuite extends CometTestBase with AdaptiveSparkPlanHelper {
}
}

test("cast between decimals with different precision and scale") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's great to see that some basic tests now pass. I assume there must have been improvements in DataFusion since we started this project.

I'd like to see the tests cover more scenarios, such as:

  • Casting from smaller scale to larger scale e.g. (10, 1) to (10, 4)
  • Tests for edge cases such as negative scale and zero scale

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.

Implement Spark-compatible cast between decimals with different precision and scale
2 participants