Implement Spark-compatible CAST from String to Floating Point
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 floating point and there are some differences in behavior compared to Spark.
- Spark supports inputs ending with
dorfsuch as-12.34dand DataFusion does not - Spark ignores leading and trailing whitespace but DataFusion does not and returns
null - DataFusion does not throw exceptions for invalid inputs in ANSI mode
Describe the potential solution
No response
Additional context
No response
Hello,
I would like to work on this, if no one has started working on it. Also is there a reference PR to help new comers get started ?
Hello,
I would like to work on this, if no one has started working on it. Also is there a reference PR to help new comers get started ?
Thanks @psvri. I am not aware that anyone else is working on this.
I have a PR in review for cast string to integer and that would be a good reference I think.
https://github.com/apache/datafusion-comet/pull/307
FYI @psvri @mattharder91 just created a PR against this.
@viirya hi I created a pr for float to string not string to float
@mattharder91 Er? I think you pointed your PR to this issue i.e., #326, no?
@viirya oh sry that was my mistake I pin it to the other one.
Oh, you pointed to wrong issue, I corrected it to be #312 now.
thank you and sry again
@mattharder91 no worries and thanks for your contribution!
Hello,
I am not able to get time to work on this. If anyone else wants to try go ahead.
Will do