Skip to content

Feat: support bit_get function #1713

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

kazantsev-maksim
Copy link
Contributor

@kazantsev-maksim kazantsev-maksim commented May 3, 2025

Which issue does this PR close?

Related to Epic: #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: #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: #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 kazantsev-maksim changed the title Bitwise get Feat: support bit_get function May 3, 2025
@kazantsev-maksim kazantsev-maksim marked this pull request as draft May 3, 2025 09:50
@kazantsev-maksim kazantsev-maksim marked this pull request as ready for review May 3, 2025 10:28
Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this PR supposed to replace the #1602 PR ?

@codecov-commenter
Copy link

codecov-commenter commented May 5, 2025

Codecov Report

Attention: Patch coverage is 90.78947% with 7 lines in your changes missing coverage. Please review.

Project coverage is 58.80%. Comparing base (f09f8af) to head (45eaeb2).
Report is 180 commits behind head on main.

Files with missing lines Patch % Lines
.../scala/org/apache/comet/serde/QueryPlanSerde.scala 54.54% 4 Missing and 1 partial ⚠️
...rc/main/scala/org/apache/comet/serde/bitwise.scala 96.92% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1713      +/-   ##
============================================
+ Coverage     56.12%   58.80%   +2.68%     
- Complexity      976     1142     +166     
============================================
  Files           119      130      +11     
  Lines         11743    12626     +883     
  Branches       2251     2359     +108     
============================================
+ Hits           6591     7425     +834     
- Misses         4012     4029      +17     
- Partials       1140     1172      +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@kazantsev-maksim
Copy link
Contributor Author

@comphead I'd like to merge #1602 first, and then update this PR again, but the reverse order is also fine.

@parthchandra
Copy link
Contributor

Same comment as in #1602 (#1602 (comment))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants