datafusion-comet icon indicating copy to clipboard operation
datafusion-comet copied to clipboard

Feat: support bit_get function

Open kazantsev-maksim opened this issue 7 months ago • 3 comments

Which issue does this PR close?

Related to Epic: https://github.com/apache/datafusion-comet/issues/240 bit_get: SELECT bit_get(0) => 0 DataFusionComet bit_get has same behavior with Spark 's bit_get function Spark: https://spark.apache.org/docs/latest/api/sql/index.html#bit_get

Closes #.

Rationale for this change

Defined under Epic: https://github.com/apache/datafusion-comet/issues/240

What changes are included in this PR?

bitwise_get.rs: impl for bit_get function QueryPlanSerde.scala: bit_get pattern matching case has been added, bitwise.scala: The bit_get function is the last function of the bitwise expressions type from the epic: https://github.com/apache/datafusion-comet/issues/240. I moved them into a separate file, following the same approach as with the array functions. CometBitwiseExpressionSuite.scala: A new UT has been added for bit_get function.

How are these changes tested?

A new UT has been added.

kazantsev-maksim avatar May 03 '25 06:05 kazantsev-maksim

Codecov Report

Attention: Patch coverage is 16.04938% with 68 lines in your changes missing coverage. Please review.

Project coverage is 58.47%. Comparing base (f09f8af) to head (ca7b32c). Report is 286 commits behind head on main.

Files with missing lines Patch % Lines
...rc/main/scala/org/apache/comet/serde/bitwise.scala 16.41% 55 Missing and 1 partial :warning:
.../scala/org/apache/comet/serde/QueryPlanSerde.scala 14.28% 6 Missing and 6 partials :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1713      +/-   ##
============================================
+ Coverage     56.12%   58.47%   +2.34%     
- Complexity      976     1141     +165     
============================================
  Files           119      131      +12     
  Lines         11743    12897    +1154     
  Branches       2251     2396     +145     
============================================
+ Hits           6591     7541     +950     
- Misses         4012     4134     +122     
- Partials       1140     1222      +82     

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

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov-commenter avatar May 05 '25 18:05 codecov-commenter

@comphead I'd like to merge https://github.com/apache/datafusion-comet/pull/1602 first, and then update this PR again, but the reverse order is also fine.

kazantsev-maksim avatar May 05 '25 18:05 kazantsev-maksim

Same comment as in #1602 (https://github.com/apache/datafusion-comet/pull/1602#discussion_r2078442637)

parthchandra avatar May 07 '25 20:05 parthchandra

@kazantsev-maksim I took the liberty of upmerging this PR

@parthchandra @comphead could you take another look when you have a chance?

andygrove avatar Jun 26 '25 00:06 andygrove

Thanks @kazantsev-maksim @parthchandra @comphead

andygrove avatar Jun 26 '25 11:06 andygrove