Skip to content

avoid unnecessary interface conversions for JSONWrappers#2843

Open
jycor wants to merge 4 commits into
mainfrom
james/json
Open

avoid unnecessary interface conversions for JSONWrappers#2843
jycor wants to merge 4 commits into
mainfrom
james/json

Conversation

@jycor

@jycor jycor commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor
Main PR
covering_index_scan_postgres 1941.92/s 1939.09/s -0.2%
groupby_scan_postgres 131.93/s 131.64/s -0.3%
index_join_postgres 682.59/s 684.54/s +0.2%
index_join_scan_postgres 871.88/s 873.81/s +0.2%
index_scan_postgres 25.52/s 25.51/s -0.1%
oltp_delete_insert_postgres 881.72/s 854.31/s -3.2%
oltp_insert 754.01/s 750.16/s -0.6%
oltp_point_select 3088.25/s 3082.02/s -0.3%
oltp_read_only 3102.69/s 3087.88/s -0.5%
oltp_read_write 2377.10/s 2360.05/s -0.8%
oltp_update_index 778.27/s 783.47/s +0.6%
oltp_update_non_index 828.98/s 826.39/s -0.4%
oltp_write_only 1828.11/s 1810.96/s -1.0%
select_random_points 1958.88/s 1969.71/s +0.5%
select_random_ranges 1131.74/s 1126.48/s -0.5%
table_scan_postgres 24.40/s 24.27/s -0.6%
types_delete_insert_postgres 825.37/s 818.64/s -0.9%
types_table_scan_postgres 8.67/s ${\color{lightgreen}10.57/s}$ ${\color{lightgreen}+21.9\%}$

Comment thread server/functions/json.go
@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor
Main PR
Total 42090 42090
Successful 18275 18276
Failures 23815 23814
Partial Successes1 5335 5335
Main PR
Successful 43.4189% 43.4212%
Failures 56.5811% 56.5788%

${\color{lightgreen}Progressions (1)}$

subselect

QUERY: select count(*) from tenk1 t
where (exists(select 1 from tenk1 k where k.unique1 = t.unique2) or ten < 0);

Footnotes

  1. These are tests that we're marking as Successful, however they do not match the expected output in some way. This is due to small differences, such as different wording on the error messages, or the column names being incorrect while the data itself is correct.

James Cor added 2 commits July 1, 2026 16:09
@dolthub dolthub deleted a comment from itoqa Bot Jul 1, 2026
@dolthub dolthub deleted a comment from itoqa Bot Jul 1, 2026
@itoqa

itoqa Bot commented Jul 2, 2026

Copy link
Copy Markdown

Ito QA test results
Ito Diff Reporta8665b32bc960f: 10 test cases ran, 0 regressions ❌, 0 new failures ❌, 0 still failing ❌, 0 fixed ✅, 10 passing ✅, 0 additional findings ⚠️.

Diff Summary

This diff run surfaced

Coverage focused on JSON output behavior across text and binary responses, nested and mixed-value query contexts, and upgraded legacy data to confirm valid, consistent serialization in real read paths. It also covered edge conditions where isolated bad JSON retrievals occur among valid rows, showing explicit deterministic failures without broader result corruption, including repeat and concurrent execution patterns.

Safe to merge — the exercised paths remained stable across normal behavior, compatibility scenarios, and failure-handling cases, with no test regressions observed. Given the broad pass across the JSON output and serialization surfaces touched by this PR, current merge risk is low.

Tests run by Ito

View full run

Result State Severity Type Description
Passing Document json_out/jsonb_out correctly route sql.JSONWrapper values through jsonWrapperToFormattedString and return normalized JSON text output.
Passing Document Nested JSONB values in records, arrays, path extraction, concatenation, and COALESCE serialized as valid text JSON without io output type errors.
Passing Format The JSON text wire-format test passed and returned compact payload bytes that match the updated expectations for object and array rows.
Passing Format The same JSON query returned different raw bytes between text and binary wire formats, and repository code plus wire assertions show this representation difference is intentional rather than an application defect.
Passing Lazy Wire-protocol SELECT on JSON columns returned compact text payloads for both object and nested-array rows, matching JSONBytes GetBytes(ctx) output.
Passing Lazy json_out propagates JSONBytes GetBytes errors directly and deterministically, with no opaque fallback behavior or result-shape drift across repeated and concurrent execution.
Passing Legacy AnyWrapper-based legacy JSON values, including large-object fixtures, were read and serialized successfully through json_out and jsonb_out without compatibility errors.
Passing Legacy Code-backed verification confirms unsupported AnyWrapper-unwrapped payloads fail with explicit "unexpected type" errors while supported JSONDocument and string payloads still serialize correctly in the same run.
Passing Legacy Round-trip, reserialization, and live SQL checks all passed, with equivalent legacy and modern JSON rows producing identical text and JSONB output.
Passing Output Text-format and binary-format reads returned valid JSON for equivalent values, with only expected representation-specific spacing differences.

Tip

Reply with @itoqa to send us feedback on this test run.

@fulghum fulghum left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good optimization to avoid the extra JSON marshalling where we can.

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