Skip to content

EQL v3 empty JSON arrays break array accessors #978

Description

@tobyhede

The EQL v3 JSON domain accepts an empty searchable vector, but ste_vec()
aggregates zero rows to SQL NULL. As a result, jsonb_array_length returns
NULL instead of zero and jsonb_array_elements raises SQLSTATE 22004 because
its FOR loop has a null upper bound.

Acceptance criteria

  • The length of an encrypted empty JSON array is zero.
  • jsonb_array_elements returns zero rows without error.
  • Populated-array behaviour is unchanged.
  • Tests exercise a real encrypted empty-array payload as well as the SQL helper
    boundary.
  • The implementation composes with the umbrella array aggregation design.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions