apache / datafusion-comet

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

feat: Implement CAST from struct to string #1066

Closed andygrove closed 2 weeks ago

andygrove commented 2 weeks ago

Which issue does this PR close?

Closes https://github.com/apache/datafusion-comet/issues/814

Rationale for this change

As we add support for complex types, we will need to support CASTing them to string, so that users can run df.show() for example.

What changes are included in this PR?

Implement CAST from struct to string

How are these changes tested?

codecov-commenter commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 66.66667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 54.82%. Comparing base (845b654) to head (7cf7ab7). Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
...scala/org/apache/comet/expressions/CometCast.scala 66.66% 2 Missing and 3 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1066 +/- ## ============================================= + Coverage 34.46% 54.82% +20.35% + Complexity 888 858 -30 ============================================= Files 113 110 -3 Lines 43580 10760 -32820 Branches 9658 2089 -7569 ============================================= - Hits 15021 5899 -9122 + Misses 25507 3807 -21700 + Partials 3052 1054 -1998 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.