Skip to content

[fix](test) Cast variant subcolumn as json in variant_hirachinal for stable output#63828

Merged
eldenmoon merged 1 commit into
apache:masterfrom
csun5285:fix/variant-hirachinal-cast-json
May 28, 2026
Merged

[fix](test) Cast variant subcolumn as json in variant_hirachinal for stable output#63828
eldenmoon merged 1 commit into
apache:masterfrom
csun5285:fix/variant-hirachinal-cast-json

Conversation

@csun5285
Copy link
Copy Markdown
Contributor

@csun5285 csun5285 commented May 28, 2026

cast(v['c'] as string) on a heterogeneous variant column can produce different whitespace formatting (e.g. "[1, 2, 3]" vs "[1,2,3]") depending on session variables fuzzed by use_fuzzy_session_variable (batch_size, enable_fold_constant_by_be, etc.), causing intermittent regression failures. Casting to json normalizes the serialization path and is stable across fuzzed execution configs (verified 50/50 runs).

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

…stable output

cast(v['c'] as string) on a heterogeneous variant column can produce
different whitespace formatting (e.g. "[1, 2, 3]" vs "[1,2,3]") depending
on session variables fuzzed by use_fuzzy_session_variable (batch_size,
enable_fold_constant_by_be, etc.), causing intermittent regression
failures. Casting to json normalizes the serialization path and is
stable across fuzzed execution configs (verified 50/50 runs).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@csun5285
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

Copy link
Copy Markdown
Member

@eldenmoon eldenmoon left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label May 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@eldenmoon
Copy link
Copy Markdown
Member

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

I found one blocking test-stability issue. The PR's goal is to remove flaky checked output caused by cast(v['c'] as string) on heterogeneous variant values, but the same suite still has an immediately preceding checked query using that exact pattern, so the regression can remain flaky under the same fuzzed session variables.

Critical checkpoints:

  • Goal/test proof: The goal is to stabilize variant_hirachinal; current change only partially accomplishes it because one checked output still uses unstable string serialization.
  • Scope/focus: The code change is small and focused, but incomplete for the stated failure mode.
  • Concurrency/lifecycle/config/compatibility/data writes/FE-BE variable passing: Not applicable; this is a regression-test-only change.
  • Parallel paths: A parallel checked query in the same suite remains unfixed.
  • Test coverage/results: Existing .out values are consistent with the changed json casts, but coverage remains vulnerable to the same flake in the earlier qt_sql.
  • Observability/performance/transactions/persistence: Not applicable.

User focus points: No additional user-provided review focus was supplied.

Comment thread regression-test/suites/variant_p0/variant_hirachinal.groovy
@eldenmoon eldenmoon merged commit ce0784d into apache:master May 28, 2026
36 checks passed
github-actions Bot pushed a commit that referenced this pull request May 28, 2026
…stable output (#63828)

cast(v['c'] as string) on a heterogeneous variant column can produce
different whitespace formatting (e.g. "[1, 2, 3]" vs "[1,2,3]")
depending on session variables fuzzed by use_fuzzy_session_variable
(batch_size, enable_fold_constant_by_be, etc.), causing intermittent
regression failures. Casting to json normalizes the serialization path
and is stable across fuzzed execution configs (verified 50/50 runs).
github-actions Bot pushed a commit that referenced this pull request May 28, 2026
…stable output (#63828)

cast(v['c'] as string) on a heterogeneous variant column can produce
different whitespace formatting (e.g. "[1, 2, 3]" vs "[1,2,3]")
depending on session variables fuzzed by use_fuzzy_session_variable
(batch_size, enable_fold_constant_by_be, etc.), causing intermittent
regression failures. Casting to json normalizes the serialization path
and is stable across fuzzed execution configs (verified 50/50 runs).
yiguolei pushed a commit that referenced this pull request May 29, 2026
…achinal for stable output #63828 (#63856)

Cherry-picked from #63828

Co-authored-by: Chenyang Sun <sunchenyang@selectdb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/4.0.x dev/4.1.2-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants