apache / datafusion-comet

Apache DataFusion Comet Spark Accelerator
https://datafusion.apache.org/comet
Apache License 2.0
551 stars 105 forks source link

feat: Implement Spark-compatible CAST from non-integral numeric types to integral types #399

Closed rohitrastogi closed 3 weeks ago

rohitrastogi commented 3 weeks ago

Which issue does this PR close?

Closes #350

Rationale for this change

Improve compatibility with Spark

What changes are included in this PR?

1) Functionality to "Spark compatible cast" floats, doubles, and decimals to bytes, shorts, ints, and longs 2) Enhanced decimal tests to check for cast edge cases

How are these changes tested?

CometCastSuite tests pass.

andygrove commented 3 weeks ago

Thank you @rohitrastogi this looks really great! Could you also run mvn package -DskipTests to regenerate compatibility.md file to include the newly supported cast expressions?

rohitrastogi commented 3 weeks ago

I ran mvn package -DskipTests to regenerate compatibility.md.