Skip to content

Conversation

@hsiang-c
Copy link
Contributor

@hsiang-c hsiang-c commented Feb 1, 2026

The bit_count function now handles scalar inputs in addition to arrays. Scalar inputs return scalar outputs, maintaining proper type semantics.

Enable bit_count tests in bitwise.sql

Which issue does this PR close?

Closes #3341

Rationale for this change

Current implementation doesn't take scalar input.

What changes are included in this PR?

  • Handle scalar input of type Boolean, Byte, Short, Integer and Long like Spark does.

How are these changes tested?

  • unit test
  • SQL test
  • CometBitwiseExpressionSuite.scala by disabling ConstantFolding.

The bit_count function now handles scalar inputs in addition to arrays.
Scalar inputs return scalar outputs, maintaining proper type semantics.

Enable bit_count tests in bitwise.sql

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@codecov-commenter
Copy link

codecov-commenter commented Feb 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.95%. Comparing base (f09f8af) to head (2d95fc5).
⚠️ Report is 917 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3361      +/-   ##
============================================
+ Coverage     56.12%   59.95%   +3.82%     
- Complexity      976     1475     +499     
============================================
  Files           119      175      +56     
  Lines         11743    16165    +4422     
  Branches       2251     2681     +430     
============================================
+ Hits           6591     9692    +3101     
- Misses         4012     5122    +1110     
- Partials       1140     1351     +211     

☔ 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.

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.

Native engine panics on scalar bit_count()

2 participants