Skip to content

[VL] Fix streaming UTs by copying tags in EnsureLocalSortRequirements#11859

Open
minni31 wants to merge 1 commit intoapache:mainfrom
minni31:oss/fix-streaming-ut-sort-tags
Open

[VL] Fix streaming UTs by copying tags in EnsureLocalSortRequirements#11859
minni31 wants to merge 1 commit intoapache:mainfrom
minni31:oss/fix-streaming-ut-sort-tags

Conversation

@minni31
Copy link
Copy Markdown

@minni31 minni31 commented Apr 1, 2026

Summary

Fixes streaming-related test suite failures for Spark 4.0 and 4.1 by preserving plan node tags when EnsureLocalSortRequirements wraps a child with SortExec.

Problem

When EnsureLocalSortRequirements creates a new SortExec to satisfy required child ordering, the new node was missing tags from the original child plan. This caused failures in streaming test suites because stateful operators (e.g., StateStoreWriter, TransformWithState) rely on tags to propagate streaming execution metadata such as isStatefulOperatorStreamingRestore.

Affected test suites include:

  • FlatMapGroupsWithStateSuite
  • TransformWithListStateSuite / TransformWithListStateTTLSuite
  • TransformWithMapStateTTLSuite
  • TransformWithStateChainingSuite / TransformWithStateInitialStateSuite
  • TransformWithValueStateTTLSuite
  • OperatorStateMetadataSuite
  • StateDataSource read suites
  • RocksDBStateStoreCheckpointFormatV2Suite

Fix

One-line fix: call newChild.copyTagsFrom(originalChild) after creating the SortExec to preserve tags from the original child plan.

Testing

Streaming test suites that were previously failing now pass with this fix.

@github-actions github-actions bot added the CORE works for Gluten Core label Apr 1, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

Run Gluten Clickhouse CI on x86

When EnsureLocalSortRequirements adds a local SortExec to satisfy
required child ordering, the new SortExec node was missing tags from
the original child. This caused streaming test failures because
StateStoreWriter and other stateful operators rely on tags (e.g.,
isStatefulOperatorStreamingRestore) to propagate streaming execution
metadata.

Fix: Call newChild.copyTagsFrom(originalChild) to preserve tags when
wrapping a child plan with SortExec.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@minni31 minni31 force-pushed the oss/fix-streaming-ut-sort-tags branch from 3f2baab to c5dfede Compare April 1, 2026 07:07
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

Run Gluten Clickhouse CI on x86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE works for Gluten Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant