-
Notifications
You must be signed in to change notification settings - Fork 145
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
Implement Spark-compatible CAST from String to Decimal #325
Comments
Hi, I'd like to contribute to this! |
Thanks @kevinmingtarja. You can take a look at @andygrove's PR as a reference #307 |
Current state for reference:
Note: I encountered a |
Hi @kevinmingtarja, are you working on this issue? If not, I would like to work on it. Thank you. |
Hey, i don't think i have the bandwidth rn to complete this, so please feel free to work on it. I have made some progress here on a branch in my fork, so feel free to take inspirations from there as well if needed! |
What is the problem the feature request solves?
What is the problem the feature request solves?
We currently delegate to DataFusion when casting from string to decimal and there are some differences in behavior compared to Spark.
4e7
produces40000000.00
in Spark, andnull
in DataFusion.
,-
,+
and empty string producenull
in Spark, and0.0
in DataFusion0
produces0
in Spark, andnull
in DataFusionCannot cast string to decimal with negative scale
). We could choose to fallback to Spark for this use case (or ifSQLConf.LEGACY_ALLOW_NEGATIVE_SCALE_OF_DECIMAL_ENABLED
is enabled)Describe the potential solution
No response
Additional context
I used the following test in
CometCastSuite
to explore this.Describe the potential solution
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: