Skip to content

[Umbrella] Delta-on-Gluten: follow-ups after the Delta Spark UT pipeline #12743

Open

Description

@felipepessoto

The Delta Spark UT pipeline landed in #12388 (fixes #9296). It runs delta-io/delta's spark test suite against a Gluten Velox bundle and gates each run against a committed baseline of known failures.

The committed main baseline contains 546 known-failure entries as of 2026-10-15 (baseline at 020211a4b). The verified reductions since the 716-entry baseline are listed below. This issue tracks the work to bring that number down and to improve the pipeline itself. It is a tracking issue only — discussion belongs in the linked issues.

1. Correctness gaps behind the known-failure baseline

These are not a consequence of Gluten declining to offload: a plan Gluten cannot offload should fall back to vanilla Spark and the test should still pass. Most entries below are bugs -- fallback not happening, metrics differing from vanilla, or the native side failing. A separate group is expected rather than fixable here: tests that assert on the query plan see a different plan once Gluten offloads, which is by design. Those are worth splitting out during triage, since they should either be fixed upstream (as delta-io/delta#7104 and delta-io/delta#7105 were) or stay in the baseline permanently.

Merged baseline reductions since #13058

The file history accounts for the full 170-entry reduction (716 to 546). Counts below follow actual merge order on main, rather than pre-merge totals quoted in individual PR descriptions.

Merged change Verified baseline reduction Entries removed Baseline before → after
#12967 Native TIMESTAMP_NTZ min/max in Delta write statistics; seven data-skipping suite variants 42 716 → 674
#13198 (fix), #13252 (baseline cleanup) 54 MERGE schema-evolution cases fixed by binding struct fields by exprId, plus one data-skipping case observed passing on the same runs 55 674 → 619
#13042 Scoped JVM fallback for Delta-generated row indexes and deleted-row flags 9 619 → 610
#13134 Preserve transaction observers in native Delta commands, including all 42 RowTrackingBackfill conflict cases and 22 other observer-related cases 64 610 → 546

The extra data-skipping case removed by #13252 was observed passing alongside the 54 MERGE fixes; this does not establish the same root cause. #12967 fixes the NTZ statistics trigger, not the general unsupported-plan fallback requested in #12538. The remaining column-mapping footer-metadata failure exposed by #13134 is tracked in #13288.

Current tracked clusters

Recounted from the same 546-entry baseline at 020211a4b; this is not an exhaustive list of remaining failures:

Current entries Area Status
130 DescribeDeltaHistorySuite + ...WithCatalogOwnedBatch100Suite #9003: 128 passed in the historical offload-disabled experiment; the other 2 need further triage
34 stats.DataSkippingDeltaV1* (7 suite variants) Remaining cases need triage; #12967 removed the 42 NTZ cases
60 ImplicitMergeCastingSuite + ImplicitStreamingMergeCastingSuite (overflow / storeAssignmentPolicy) needs triage
0 commands.backfill.RowTrackingBackfillConflicts(DV)Suite All 42 previously listed cases removed by #13134
14 io.delta.tables.DeltaTableHadoopOptionsSuite — Hadoop FS options #4963

Historical triage also identified overlapping cross-suite clusters: 225 baseline tests passed with IncrementMetric offload disabled (#9003; measured below, replacing the earlier ~226 estimate), and ~47 were attributed to the Delta stats tracker ClassCastException when the stats plan could not be offloaded (#12538; estimate from the triage in #12388). These are historical measurements, not additional current failure counts; do not add them to the table totals.

IncrementMetric offload experiment (2026-09-23)

Diagnostic draft #13112 (5e18f8d5b) disables Velox's IncrementMetric filter/project offload while retaining native Delta scans. The completed Delta Spark UT run tested Spark 4.1 / Delta v4.2.0 against the unchanged 716-entry baseline, with no quarantine or test-selection changes.

Result Count
Baseline failures now passing 225 (31.4%)
Tests still failing 491
New failures 0
Distinct tests executed 19,121
Complete shard result sets 8 / 8
Baseline entries skipped / stale 0 / 0

The 225 now-passing tests span 55 suites: 128 in the two DescribeDeltaHistory suites (64 each), 92 in generated MERGE suites, and 5 in Delta CDC streaming suites. Of the 130 history-suite baseline failures, only operation metrics - merge still fails in each suite (2 entries); those need further triage.

The aggregate job succeeded. The workflow is red because the gate deliberately fails on now-passing baseline tests, not because this experiment introduced new failures. This measures the impact of disabling offload; it is not a native IncrementMetric fix. This experiment alone does not justify closing #9003 or removing its baseline entries; do not replace the committed baseline with this diagnostic run's 491-entry artifact. The 716-entry starting point is historical, while the current baseline changes as independently validated fixes land.

Related type-support gap: TIMESTAMP_NTZ (#11622), which is one trigger of #12538.

2. Native bugs currently worked around in CI

Temporary workarounds should be removed together with the corresponding fixes. Force-failed tests remain visible in the known-failure baseline; they are not silently skipped.

3. Pipeline improvements

Notes for whoever picks these up

  • Refresh the baseline by running Delta Spark UT (Gluten) with update_baseline=true and committing the produced artifact; see .github/workflows/util/delta-spark-ut/README.md. - A test that fails consistently belongs in known-failures.txt. flaky-tests.txt / flaky-error-patterns.txt are only for tests that genuinely pass on some runs and fail on others — quarantining a deterministic failure hides a real bug. - The nightly run enforces fail_on_fixed=true, so when a fix lands, the nightly goes red until the now-passing tests are removed from the baseline. That is the intended signal.

Activity

  1. felipepessoto commented on Sep 11, 2026

    @felipepessoto
    ContributorAuthor

    @rui-mo, @zhztheplayer, @dcoliversun, @philo-he, @malinjawi, is anyone interested in looking into #9003? Based on my investigation, it seems to be responsible for about one-third of the Delta test failures we're seeing.

    I spent some time digging into it, but it's outside my current knowledge of Gluten/Velox.

  2. rui-mo commented on Sep 16, 2026

    @rui-mo
    Contributor

    @felipepessoto I noticed that a reproducible UT was provided in #9003. I was wondering whether the IncrementMetric issue you mentioned is only reproducible in Delta cases.

  3. felipepessoto commented on Sep 16, 2026

    @felipepessoto
    ContributorAuthor

    @felipepessoto I noticed that a reproducible UT was provided in #9003. I was wondering whether the IncrementMetric issue you mentioned is only reproducible in Delta cases.

    @rui-mo, Right, the increment metric is implemented in Delta only.

    The fix probable requires changing Velox code to support some way to track the metric correctly

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions