Skip to content

[DO NOT MERGE] Same as #12783, plus the upstream Velox fix (expected green) - #12808

Closed
felipepessoto wants to merge 2 commits into
apache:mainfrom
felipepessoto:delta-dv-validation-with-velox-fix
Closed

[DO NOT MERGE] Same as #12783, plus the upstream Velox fix (expected green)#12808
felipepessoto wants to merge 2 commits into
apache:mainfrom
felipepessoto:delta-dv-validation-with-velox-fix

Conversation

@felipepessoto

@felipepessoto felipepessoto commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Do not merge. This pins the native build to an unmerged upstream pull request. It exists to produce a CI result, not to land.

What this is

This is #12783 plus one line: it sets UPSTREAM_VELOX_PR_ID="18536" in ep/build-velox/src/get-velox.sh, so get-velox.sh applies the upstream Velox fix before the native build.

change Delta suite expected
#12783 enable Velox per-operator output validation 🔴 red
this PR same, + the upstream Velox fix 🟢 green

Both are branched from the same commit on main, so the fix is the only difference between them.

Why

#12377 has been hard to act on because the failure is intermittent and reports a meaningless row index. Root cause: on a Delta deletion-vector write the scan projects only synthesized columns with a pushed-down filter, and Velox emits a RowVector whose row-index child has no rows. That child is wrapped in a dictionary and read out of bounds, so the "row index" is whatever heap memory follows.

Red on #12783 and green here is the before/after evidence, available now rather than after the upstream fix merges and a Velox bump lands.

Notes

Was this patch authored or co-authored using generative AI tooling?

Generated-by: GitHub Copilot CLI (Claude Opus 5)

@felipepessoto

Copy link
Copy Markdown
Contributor Author

Not intended to merge. This exists to produce a CI result, alongside #12783.

Result: green. All 8 Delta suite shards and the aggregate job passed, with Velox's per-operator output validation enabled throughout.

#12783 is this same branch without the one line that applies facebookincubator/velox#18536, on the same base commit and the same pinned Velox, and 5+ of its 8 shards fail with Output validation failed for [operator: TableScan, plan node ID: 0]. So the upstream fix is the only difference, and it clears the whole suite -- with no regressions and no other validation failures anywhere in it.

Plan from here: once velox#18536 merges it arrives through the regular weekly Velox bump, after which a separate PR removes the DV bitmap entries from flaky-error-patterns.txt and closes #12377. This PR and #12783 can be closed at that point.

@felipepessoto

Copy link
Copy Markdown
Contributor Author

Superseding the green result above: that run applied the patch at 19:04 UTC, before facebookincubator/velox#18536 was reworked in response to review. It fetched 6,425 bytes / one commit, where the PR now serves 12,276 bytes / three, so it validated the earlier per-call-site approach rather than the current one.

Re-triggered with an empty commit (967ba120b) so the branch content is unchanged and only the fetch timing differs. Verified beforehand that the current patch applies cleanly to the pinned Velox revision and that the resulting reader source is byte-identical to the revision tested locally.

…idation

The DV bitmap row-index failures in apache#12377 are intermittent and report a
meaningless value, because by the time anything notices, the damage is an
out-of-bounds read: a Delta deletion-vector write scans only synthesized
columns with a pushed-down filter, and on that path Velox emits a RowVector
whose row-index child has no rows. The child is then wrapped in a dictionary,
and reading it returns whatever heap memory follows. Whether that memory
happens to fall outside Delta's valid range decides whether the query aborts
or silently accepts a wrong row index, which is why the failure moved from
test to test and why the reported value differed every time.

Velox can catch this at the source. `debug.validate_output_from_operators`
checks every operator's output for structural consistency -- among other
things, that a dictionary's indexes address rows its base vector has -- and
names the first operator to emit a malformed vector. Expose it as a Gluten
config and turn it on for the Delta suite.

The suite is expected to fail while this is enabled, deterministically and
with the responsible operator named, instead of intermittently with an
arbitrary number:

  Output validation failed for [operator: TableScan, plan node ID: 0]:
    Child vector has size 0 less than parent and parent has no nulls 10.

That is the point: it turns apache#12377 into a reliable signal. Once the upstream
fix is picked up the suite must go green again, which is what validates it.

  Velox issue: facebookincubator/velox#18535
  Velox fix:   facebookincubator/velox#18536

Verified locally against the pinned Velox with and without that fix, on
MergeIntoExtendedSyntaxSQLPathBasedDVsPredPushOnSuite "extended syntax - only
update - isPartitioned: true": 9 validation failures and a failed test before,
0 failures and a pass after.

The config defaults to off, so nothing outside this suite changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

[GLUTEN-12377][VL] Apply clang-format to the new config declaration

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@felipepessoto
felipepessoto force-pushed the delta-dv-validation-with-velox-fix branch from ef63b2b to 6967a62 Compare August 19, 2026 00:02
@github-actions github-actions Bot removed the INFRA label Aug 19, 2026
apache#12783 turns on Velox's per-operator output validation for the Delta suite and
is expected to fail, deterministically, at the scan that emits a row-index
child shorter than the vector containing it (GLUTEN-12377).

This branch is that change plus one line: it points UPSTREAM_VELOX_PR_ID at
the upstream fix, so get-velox.sh applies it before the native build. The same
suite is expected to pass here.

Red on apache#12783 and green here is the before/after evidence that the defect is
the Velox one and that the fix addresses it, without waiting for the fix to
merge and a Velox bump to land.

  Velox issue: facebookincubator/velox#18535
  Velox fix:   facebookincubator/velox#18536

Not for merge: it pins the build to an unmerged pull request.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@felipepessoto

Copy link
Copy Markdown
Contributor Author

The #12846 is merged, we shouldn't need this anymore. #12783 should be green

@felipepessoto
felipepessoto deleted the delta-dv-validation-with-velox-fix branch August 22, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants