Skip to content

jsonb operators broken on cold data, and the documented ::jsonb workaround doesn't work #124

Closed

Description

@imtiazqa

The docs say #> works through the view and that ?/@> work with a data::jsonb cast. Neither is true on cold data.

Repro:

SELECT coldfront.create_iceberg_table('public','jtest',
  '[{"name":"id","type":"bigint"},{"name":"data","type":"jsonb"}]'::jsonb);
INSERT INTO jtest VALUES (1, '{"k":1,"a":[1,2]}'::jsonb);

SELECT data->>'k'     FROM jtest WHERE id=1;    -- works: 1
SELECT data#>'{a,0}'  FROM jtest WHERE id=1;    -- ERROR: Parser Error at "#"
SELECT id FROM jtest WHERE (data::jsonb) ? 'k'; -- ERROR: operator does not exist: json ? text

**Expected:** #> returns 1; the ::jsonb cast makes ? return 1.
**Actual:** both error. The column reads back as json (not jsonb) through the view, so the cast can't help.

Activity

  1. vyruss commented on Oct 29, 2026

    @vyruss
    Contributor

    Thanks for the catch, the architecture doc was wrong. #129 makes those operators work on cold and decoupled reads by rewriting them into DuckDB's JSON functions, and corrects the docs.

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