Skip to content

Searchable encrypted JSON arrays: implement counted-container semantics #976

Description

@tobyhede

Searchable encrypted JSON arrays in EQL v3 need a coherent container model so
path queries, array length, and array element access agree for populated and
empty arrays.

The selected direction keeps the flat searchable-vector encoding and gives an
array container an authenticated selector for its elements. Query-time array
operations gather sibling elements through that selector instead of inferring
array shape from an entry flag.

Required behaviour

  • Path queries aggregate array matches into one array result.
  • Empty arrays produce an empty result and length zero without a null loop bound.
  • The element selector is authenticated and included in inbound metadata
    comparison so a stored container cannot be repointed silently.
  • The obsolete entry-level array marker is removed from the wire contract.
  • Nested-array limitations and the resulting length, equality-partition, and
    ordering disclosure are documented explicitly.
  • SQL, client, proxy, fixtures, and cross-side conformance tests land as one
    coordinated breaking change.

Sequencing

First drop STRICT from the full jsonb_path_* family —
jsonb_path_query, jsonb_path_exists, and jsonb_path_query_first — to
restore SQL function inlining, then land the array aggregation and coordinated wire changes.
Regression coverage must include
real populated and empty arrays rather than only hand-built array documents.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions