Skip to content

fix(nimble): Keep nulls in dictionary reads without AVX2 (#18621) - #18621

Open
Yuhta wants to merge 1 commit into
facebookincubator:mainfrom
Yuhta:export-D116833280
Open

fix(nimble): Keep nulls in dictionary reads without AVX2 (#18621)#18621
Yuhta wants to merge 1 commit into
facebookincubator:mainfrom
Yuhta:export-D116833280

Conversation

@Yuhta

@Yuhta Yuhta commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary:

Reading a Nimble string column that keeps its dictionary encoding dropped every null on any platform where process::hasAvx2() is false, which is all of aarch64. A 200-row column holding always_the_same with a null every 7th row came back as a DictionaryVector carrying no null flags, so row 0 read as always_the_same instead of null.

The dense dictionary-index path wrote nulls only into the reader's read-range bitmap. It then relied on returnReaderNulls_ to hand that bitmap back from resultNulls(). setReturnNullsMode clears that flag whenever useBulkPath() is false, and process::hasAvx2() makes that permanent off AVX2. resultNulls() then returns the output-indexed buffer instead, which nothing on this path filled. It now copies the read-range nulls into that buffer, the way the sparse row-set path already did.

Reviewed By: vandreykiv

Differential Revision: D116833280

@netlify

netlify Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit f7f27f4
🔍 Latest deploy log https://app.netlify.com/projects/meta-velox/deploys/6a8b919a79db3c0008bb5997

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 21, 2026
@meta-codesync

meta-codesync Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@Yuhta has exported this pull request. If you are a Meta employee, you can view the originating Diff in D116833280.

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown

Selective Build Plan

Linux release with adapters is running a full build (PR has a standing approval). See the CI workflows README for what this means.


Selective build plan

@meta-codesync meta-codesync Bot changed the title fix(nimble): Keep nulls in dictionary reads without AVX2 fix(nimble): Keep nulls in dictionary reads without AVX2 (#18621) Aug 23, 2026
@Yuhta
Yuhta force-pushed the export-D116833280 branch from 7616f81 to b5dd612 Compare August 23, 2026 20:26
Yuhta added a commit to Yuhta/velox that referenced this pull request Aug 23, 2026
…ubator#18621)

Summary:

Reading a Nimble string column that keeps its dictionary encoding dropped every null on any platform where `process::hasAvx2()` is false, which is all of aarch64. A 200-row column holding `always_the_same` with a null every 7th row came back as a `DictionaryVector` carrying no null flags, so row 0 read as `always_the_same` instead of null.

The dense dictionary-index path wrote nulls only into the reader's read-range bitmap. It then relied on `returnReaderNulls_` to hand that bitmap back from `resultNulls()`. `setReturnNullsMode` clears that flag whenever `useBulkPath()` is false, and `process::hasAvx2()` makes that permanent off AVX2. `resultNulls()` then returns the output-indexed buffer instead, which nothing on this path filled. It now copies the read-range nulls into that buffer, the way the sparse row-set path already did.

Reviewed By: vandreykiv

Differential Revision: D116833280
Yuhta added a commit to Yuhta/velox that referenced this pull request Aug 23, 2026
…ubator#18621)

Summary:

Reading a Nimble string column that keeps its dictionary encoding dropped every null on any platform where `process::hasAvx2()` is false, which is all of aarch64. A 200-row column holding `always_the_same` with a null every 7th row came back as a `DictionaryVector` carrying no null flags, so row 0 read as `always_the_same` instead of null.

The dense dictionary-index path wrote nulls only into the reader's read-range bitmap. It then relied on `returnReaderNulls_` to hand that bitmap back from `resultNulls()`. `setReturnNullsMode` clears that flag whenever `useBulkPath()` is false, and `process::hasAvx2()` makes that permanent off AVX2. `resultNulls()` then returns the output-indexed buffer instead, which nothing on this path filled. It now copies the read-range nulls into that buffer, the way the sparse row-set path already did.

Reviewed By: vandreykiv

Differential Revision: D116833280
@Yuhta
Yuhta force-pushed the export-D116833280 branch from b5dd612 to a5a8dfd Compare August 23, 2026 22:26
@Yuhta
Yuhta requested a review from majetideepak as a code owner August 23, 2026 22:26
…ubator#18621)

Summary:

Reading a Nimble string column that keeps its dictionary encoding dropped every null on any platform where `process::hasAvx2()` is false, which is all of aarch64. A 200-row column holding `always_the_same` with a null every 7th row came back as a `DictionaryVector` carrying no null flags, so row 0 read as `always_the_same` instead of null.

The dense dictionary-index path wrote nulls only into the reader's read-range bitmap. It then relied on `returnReaderNulls_` to hand that bitmap back from `resultNulls()`. `setReturnNullsMode` clears that flag whenever `useBulkPath()` is false, and `process::hasAvx2()` makes that permanent off AVX2. `resultNulls()` then returns the output-indexed buffer instead, which nothing on this path filled. It now copies the read-range nulls into that buffer, the way the sparse row-set path already did.

Reviewed By: vandreykiv

Differential Revision: D116833280
@Yuhta
Yuhta force-pushed the export-D116833280 branch from a5a8dfd to f7f27f4 Compare August 24, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants