Skip to content

[VL] Translate Velox bitmap_construct_agg exceptions to Spark-native exception types #12238

@minni31

Description

@minni31

Background

When bitmap_construct_agg is offloaded to native Velox execution, invalid bitmap positions throw a GlutenException (wrapping VeloxUserError) instead of the expected SparkArrayIndexOutOfBoundsException with error condition INVALID_BITMAP_POSITION.

Current State

In PR #12142, we excluded the following error-path tests from VeloxTestSettings as a workaround:

  • INVALID_BITMAP_POSITION: position out of bounds
  • INVALID_BITMAP_POSITION: negative position

These tests verify that Spark throws SparkArrayIndexOutOfBoundsException for out-of-bounds and negative positions in bitmap_construct_agg. Since Velox produces its own error format (VeloxUserError), the JVM receives a GlutenException instead.

Expected Behavior

The JVM-side error translation layer should detect Velox errors for invalid bitmap positions and re-throw them as SparkArrayIndexOutOfBoundsException with the appropriate INVALID_BITMAP_POSITION error condition, preserving Spark error API compatibility.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions