Skip to content

[GLUTEN-6887][VL] Preserve the Parquet read pool and test duplicate-key anti joins - #13814

Closed
felipepessoto wants to merge 6 commits into
apache:mainfrom
felipepessoto:felipepessoto-upstream-velox-update
Closed

felipepessoto wants to merge 6 commits into
apache:mainfrom
felipepessoto:felipepessoto-upstream-velox-update

Conversation

@felipepessoto

@felipepessoto felipepessoto commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 9ad7331ab19878ca5f37c7fe18bbeedb414784a9

Dimension Assessment Rationale
Change confidence 9/10 ↑ The resolved Parquet translation unit compiled against the pinned Velox. A runtime comparison read identical data with both constructors and confirmed only the PR's constructor passed the reader pool to the storage stream.
↑ The Spark 3.5 run passed all 24 test executions, including the strengthened anti-join case, using the resolved Scala sources and native libraries built for #13808.
↓ No full native link and end-to-end Spark run using this exact merge commit locally; new x86, ARM, and Kafka CI are pending.
Diagnosis confidence 10/10 ↑ The pre-update BufferedInput(ReadFile, pool) supplied the pool to ReadFileInputStream. On current main, constructing that stream with only the file leaves FileIoContext.pool null, even though BufferedInput itself uses the reader pool.
↑ The pinned Velox runtime exhibited exactly that difference.
Evidence fit 8/10 ↑ The retained native change restores the pre-update pool propagation. The strengthened anti-join case exercises both build rows of a repeated key, including a null payload, on both broadcast-build paths.
↓ The historical Spark 3.4 crash and Spark 3.5 result failure concerned the join implementation now fixed on main, not the Parquet pool.

What changes are proposed in this pull request?

#13808 landed the Velox pin and compatibility fixes on main. This PR now has two changes relative to that base:

  • In ParquetReaderIterator, pass the local file and FileIoContext{.pool = &opts.memoryPool()} to BufferedInput. This supplies the reader pool to the underlying file reads as well as to the buffering layer, as before the Velox update.
  • Strengthen the existing null-tolerant broadcast anti-join test. Two probe rows with the same key each need a different build row to match; one build payload is null. Keeping just one of those rows now fails the test regardless of which one survives. Both SQL forms and both driver- and executor-side builds remain covered.

The original bot commit (068bd634bf60ebd6c48b18df42ea5f8385ea7cb0) and the separate Gluten fix commits remain in the branch history. There is no net pin change, and the PR keeps main's cached/direct input and hash-table implementations. Relates to #6887.

How was this patch tested?

  • Built ParquetReaderIterator.cc from the resolved tree to an object with GCC 13.3.1 and the pinned IBM Velox b33d1af2498a4fa52fff9ddbfa20ef0b17327121. Confirmed that it calls the ReadFile, FileIoContext overload.
  • Ran both constructors against the pinned CI Velox library with an in-memory file. Both read the expected bytes; the stream's FileIoContext.pool was null for the main-side constructor and exactly the reader pool for the resolved constructor.
  • Built the Spark 3.5 Velox modules and ran VeloxHashJoinSuite and the selected anti-join case with the resolved Scala sources and the native artifact from [GLUTEN-6887][VL] Daily Update Velox Version (2026_11_26) #13808. All 24 test executions passed. This Spark run did not use a locally linked full native library from the merge commit.
  • Scala formatting, clang-format 15.0.7, license headers, and diff whitespace checks passed.

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

Generated-by: GitHub Copilot 1.0.115-7 (GPT-6.1 Sol and GPT-6.2 Astra)

GlutenPerfBot and others added 2 commits November 26, 2026 16:26
Pass FileIoContext to both Velox buffered input constructors while retaining the existing file options, reader memory pool, and cached-read storage hint.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 27, 2026 00:40

Copilot AI 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.

🔵 Needs a closer look

The broad Velox pin updates have only header-level syntax validation, leaving full native build/link compatibility and runtime scan correctness for human review of CI results.

No open issues 🎉

What changed in this PR

Updates Gluten’s Velox dependency for the ongoing rebase work in #6887, incorporating the version bump from #13808 and adapting buffered input construction to the new FileIoContext API.

Changes:

  • Advance both IBM Velox pins from 2026_11_19 to 2026_11_26.
  • Pass file-read options and the reader memory pool through FileIoContext, preserving cacheability for cached reads.
File Description
ep/​build-velox/​src/​get-velox.sh Updates the default and enhanced Velox pins.
cpp/​velox/​memory/​GlutenDirectBufferedInput.h Adapts direct buffered input construction to FileIoContext.
cpp/​velox/​memory/​GlutenBufferedInputBuilder.h Adapts cached buffered input construction, preserving cacheability.

Review effort: Balanced

The pinned Velox BufferedInput constructor takes FileIoContext for a ReadFile. Use the reader options pool for local Parquet reads, leaving the other context fields at their previous defaults.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@felipepessoto
felipepessoto force-pushed the felipepessoto-upstream-velox-update branch from 1869587 to 75eed27 Compare November 27, 2026 02:24
Copilot AI balanced review requested due to automatic review settings November 27, 2026 02:24

Copilot AI 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.

🔵 Needs a closer look

The broad Velox update lacks full native build/link and runtime validation, requiring human confirmation of integration CI for default and enhanced backend configurations.

No open issues 🎉

Review effort: Balanced

Use AssertQueryBuilder::countResults to execute plans without retaining their output, as in the pinned Velox exception tests. Keep the original and round-trip executions inside the existing expected-error check.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 27, 2026 05:09

Copilot AI 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.

🔵 Needs a closer look

Native API compatibility remains unverified on the current revision because local validation covered only selected translation units, while linked CI runs were cancelled or failed on the now-replaced readCursor call.

No open issues 🎉

Review effort: Balanced

Use a null-tolerant filter that references a build key in the synthetic join. A constant filter now permits Velox to keep keys alone, leaving the real probe without its build payload. Retain duplicates for filtered broadcasts and keep null-pruning unchanged.

Exercise both build modes with duplicate keys whose null and non-null payloads are each needed for the expected anti-join result.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 27, 2026 07:06

Copilot AI 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.

🔵 Needs a closer look

The Velox rebase changes native I/O and join semantics, but cancelled x86/ARM runs and compile-only local checks leave critical runtime and regression coverage unconfirmed.

No open issues 🎉

Review effort: Balanced

Keep the upstream buffered-input and broadcast hash-build migrations, including its probe-only filter handling. Preserve the Parquet file I/O pool and the duplicate-key anti-join regression across both broadcast build modes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 27, 2026 14:09
@github-actions github-actions Bot removed the BUILD label Nov 27, 2026

Copilot AI 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.

🟢 Approval recommended

No active review issues are reported for the Parquet I/O API adaptation and expanded anti-join regression coverage.

No open issues 🎉

Review effort: Balanced

@felipepessoto felipepessoto changed the title [GLUTEN-6887][VL] Update Velox and fix buffered input construction [GLUTEN-6887][VL] Preserve the Parquet read pool and test duplicate-key anti joins Nov 27, 2026
@felipepessoto
felipepessoto deleted the felipepessoto-upstream-velox-update branch November 27, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants