Skip to content

Add integration tests for SQLite json -> and ->> operators - #5169

Open
zaveshaa wants to merge 3 commits into
diesel-rs:mainfrom
zaveshaa:add-sqlite-json-arrow-operator-tests
Open

Add integration tests for SQLite json -> and ->> operators#5169
zaveshaa wants to merge 3 commits into
diesel-rs:mainfrom
zaveshaa:add-sqlite-json-arrow-operator-tests

Conversation

@zaveshaa

@zaveshaa zaveshaa commented Aug 27, 2026

Copy link
Copy Markdown

Issue #4366 asked for integration coverage of the SQLite json -> and ->> operators. The operators exist but only doc-tests cover them.

These integration tests add:

  • -> (retrieve_as_object_sqlite) with a JSON path and an integer index, on Json and Jsonb
  • ->> (retrieve_as_text) with a JSON path and an array index, plus the NULL case for a missing path

Relates to #4366.

@weiznich
weiznich requested a review from a team August 28, 2026 14:41
@weiznich

Copy link
Copy Markdown
Member

Thanks for opening this PR. Could you explain the motivation to add these tests? For me it looks like that this behaviour is already tested by the doc-tests, so the tests look rather duplicated to me?

@zaveshaa

zaveshaa commented Aug 29, 2026

Copy link
Copy Markdown
Author

Good point. The doc-tests cover the basic behaviour of -> and ->> on Json, but they run in-memory and don't hit a real database with the JSON path/index variants. Issue #4366 asked for integration coverage since the doc-tests only exercise the simplest case.

That said, if you think the doc-tests already cover this well enough, I'm fine dropping the PR — no point adding redundant tests. Let me know which way you'd rather go.

@zaveshaa
zaveshaa force-pushed the add-sqlite-json-arrow-operator-tests branch from 4b416fa to 2fed431 Compare August 29, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants