Skip to content

Native engine panics on scalar bit_count() #3341

@andygrove

Description

@andygrove

Description

When Spark's ConstantFolding optimizer rule is disabled, an all-literal bit_count() call reaches the native engine, which panics with:

shouldn't go to bitwise count scalar path.

How to Reproduce

SET spark.sql.optimizer.excludedRules=org.apache.spark.sql.catalyst.optimizer.ConstantFolding;
SELECT bit_count(7);

Expected Behavior

The native engine should handle scalar bit_count inputs gracefully — either by computing the correct result or by falling back to Spark, not by panicking.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions