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

@csun5285csun5285 commented May 28, 2026

Copy link
Copy Markdown
Contributor

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
ContributorAuthor

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?

@eldenmooneldenmoon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@github-actionsgithub-actionsBot 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

github-actions[bot]
github-actionsBot previously requested changes May 28, 2026

@github-actionsgithub-actionsBot 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.

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 threadregression-test/suites/variant_p0/variant_hirachinal.groovy
@eldenmoon
eldenmoon merged commit ce0784d into apache:masterMay 28, 2026
36 checks passed
github-actionsBot 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-actionsBot 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>
zhaorongsheng pushed a commit to zhaorongsheng/doris that referenced this pull request Jun 4, 2026
…stable output (apache#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).
@yiguoleiyiguolei mentioned this pull request Jun 14, 2026
morrySnow pushed a commit that referenced this pull request Aug 31, 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).
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.dev/4.0.xdev/4.1.2-mergedreviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@csun5285@hello-stephen@eldenmoon@yiguolei