[fix](regression) Stabilize variant hirachinal array output#63610
Conversation
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Stabilize the variant predefine hirachinal regression output by serializing v['c'] through JSON instead of relying on variant string formatting, which can differ in insignificant array whitespace.
### Release note
None
### Check List (For Author)
- Test: Regression test
- ./run-regression-test.sh --run --conf tmp/regression-conf.auto.groovy -d variant_p0/predefine -s regression_test_variant_predefine_hirachinal -forceGenOut
- ./run-regression-test.sh --run --conf tmp/regression-conf.auto.groovy -d variant_p0/predefine -s regression_test_variant_predefine_hirachinal
- Behavior changed: No
- Does this need documentation: No
|
run buildall |
|
run buildall |
There was a problem hiding this comment.
Pull request overview
Stabilizes the regression output for the “variant hirachinal” predefined test by avoiding Variant-to-string formatting differences (notably insignificant whitespace in arrays) and instead serializing v['c'] via JSON.
Changes:
- Update regression queries to use
cast(v['c'] as json)instead ofcast(v['c'] as string). - Regenerate the expected
.outfile to reflect the stable JSON serialization output (e.g.,[1,2,3]).
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| regression-test/suites/variant_p0/predefine/variant_hirachinal.groovy | Switches v['c'] serialization in test queries from string formatting to JSON casting for stable output. |
| regression-test/data/variant_p0/predefine/variant_hirachinal.out | Updates expected results to match JSON serialization formatting (removes array whitespace variance). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| order_qt_sql1 "select cast(v['c'] as json) from var_rs where k = -3 or k = -2 or k = -4 or (k = 1 and v['c'] = 1024) order by k" | ||
| order_qt_sql2 "select cast(v['c'] as json) from var_rs where k = -3 or k = -2 or k = 1 order by k, cast(v['c'] as text) limit 3" |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
|
/review |
There was a problem hiding this comment.
Review conclusion: no additional blocking issues found in this PR. The diff is narrowly scoped to stabilizing one variant regression query by casting the selected sub-value to JSON and updating the generated expected output accordingly. I did not duplicate the already-open inline thread about using var_rs instead of ${table_name}.
Critical checkpoint conclusions:
- Goal/test proof: The stated goal is to avoid insignificant variant string-format whitespace differences in
regression_test_variant_predefine_hirachinal; the query/output changes match that goal, and the PR reports both force-generating and rerunning the focused regression test. CI regression checks are passing. - Scope/focus: The change is small and limited to the affected regression suite and
.outfile. - Concurrency/lifecycle/config/compatibility/persistence/data-write concerns: Not applicable; this is regression test SQL/output only.
- Parallel paths: Similar variant hierarchy suites still use string casts, but this PR targets the predefine suite output instability specifically; no distinct correctness issue found from that alone.
- Test coverage/results: The expected output is consistent with JSON serialization for the changed query. No additional user-provided focus points were present.
- Observability/performance: Not applicable for this test-only change.
Stabilize the variant predefine hirachinal regression output by serializing `v['c']` through JSON instead of relying on variant string formatting, which can differ in insignificant array whitespace.
Stabilize the variant predefine hirachinal regression output by serializing `v['c']` through JSON instead of relying on variant string formatting, which can differ in insignificant array whitespace.
What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Stabilize the variant predefine hirachinal regression output by serializing
v['c']through JSON instead of relying on variant string formatting, which can differ in insignificant array whitespace.Release note
None
Check List (For Author)
./run-regression-test.sh --run --conf tmp/regression-conf.auto.groovy -d variant_p0/predefine -s regression_test_variant_predefine_hirachinal -forceGenOut./run-regression-test.sh --run --conf tmp/regression-conf.auto.groovy -d variant_p0/predefine -s regression_test_variant_predefine_hirachinal