Skip to content

Add decoder for DELTA_BYTE_ARRAY to Parquet reader - #14101

Merged
rapids-bot[bot] merged 88 commits into
NVIDIA:branch-23.12from
etseidl:decode_delta_byte_arr
Nov 16, 2023
Merged

rapids-bot[bot] merged 88 commits into
NVIDIA:branch-23.12from
etseidl:decode_delta_byte_arr

Conversation

@etseidl

@etseidl etseidl commented Sep 13, 2023 •

Copy link
Copy Markdown
Contributor

Description

Part of #13501. Adds ability to decode DELTA_BYTE_ARRAY encoded pages.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot

copy-pr-bot Bot commented Sep 13, 2023

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the libcudf Affects libcudf (C++/CUDA) code. label Sep 13, 2023
@etseidl

etseidl commented Sep 15, 2023 •

Copy link
Copy Markdown
Contributor Author

This one cannot be tested with python in same way the DELTA_BINARY_PACKED decoder is because pyarrow doesn't yet support writing DELTA_BYTE_ARRAY (as of version 13.0, it will be in 14.0). The only option at this point is to add yet another small parquet file to the python test data directory, but that's not a very thorough test.

@etseidl
etseidl changed the base branch from branch-23.10 to branch-23.12 September 27, 2023 16:49
@github-actions github-actions Bot added the Python Affects Python cuDF API. label Sep 29, 2023
@etseidl
etseidl marked this pull request as ready for review September 29, 2023 22:37
@etseidl
etseidl requested a review from a team as a code owner September 29, 2023 22:37
@etseidl
etseidl requested a review from nvdbaranec November 13, 2023 18:10
@vuule

vuule commented Nov 14, 2023

Copy link
Copy Markdown
Contributor

Added some more tests now that we've moved to arrow 14. Should we think about reverting #11480 so we can test skip rows, or just wait for the encoder? @vuule

We probably should, since we already maintain the whole feature in libcudf. I'll let you know after an internal discussion.

@vuule vuule self-assigned this Nov 14, 2023
@vuule

vuule commented Nov 14, 2023

Copy link
Copy Markdown
Contributor

/ok to test

Comment thread cpp/src/io/parquet/page_delta_decode.cu Resolved
} else { // warp 3
target_pos = min(s->nz_count, src_pos + batch_size);
}
__syncthreads();

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.

Is this sync necessary? There's one already at the bottom of the loop and there's nothing here that seems to require synchronization. I just looked at the related loop in page_data.cu and we're doing it there as well. Hmm. This feels very vestigial.

@etseidl etseidl Nov 15, 2023 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never thought about it, but I think you're right. Maybe back in the day target_pos was shared or something. I'll take a look at all the decoders.

Edit: Did some archaeology and that sync has been there since the decoder was reworked in 2019, and near as I can tell it wasn't needed then either. I've removed them from the 4 current decoders.

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.

Actually, let's leave them in for now and remove them in a separate PR. I'd rather let it soak for a full milestone (until 24.02) to make sure there's not something subtle here that we're missing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I'll put them back

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done...and added some TODOs

@vuule

vuule commented Nov 15, 2023

Copy link
Copy Markdown
Contributor

/ok to test

@vuule

vuule commented Nov 16, 2023

Copy link
Copy Markdown
Contributor

/ok to test

@galipremsagar galipremsagar 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.

@vuule vuule added the 5 - Ready to Merge Testing and reviews complete, ready to merge label Nov 16, 2023
@vuule

vuule commented Nov 16, 2023

Copy link
Copy Markdown
Contributor

/merge

@rapids-bot
rapids-bot Bot merged commit bf63d10 into NVIDIA:branch-23.12 Nov 16, 2023
@etseidl
etseidl deleted the decode_delta_byte_arr branch November 16, 2023 23:09
etseidl added a commit to etseidl/cudf that referenced this pull request Dec 8, 2023
wjxiz1992 added a commit to NVIDIA/cudf-spark that referenced this pull request Sep 7, 2026
…bricks] (#15852)

**JaCoCo production line coverage: +0 lines** (measured: `delta-lake`,
`shuffle-plugin`, `sql-plugin`, `udf-compiler`; shim 350, vs nightly
b19; `delta-lake` report group is stub-only; Iceberg implementation not
loaded/applicable)

Contributes to NVIDIA/cudf#13501.

### Description

Five Parquet V2 encoding fixtures remained xfailed after cuDF added the
corresponding reader support in NVIDIA/cudf#13637, NVIDIA/cudf#14101,
and NVIDIA/cudf#14590. The resolved cudf-spark JNI artifact embeds cuDF
revision `c2c4e85881a52e93e042a59cf88b7633147760c2`, which contains all
three fixes.

This change removes only those five fixture entries from `_xfail_files`.
The existing `test_parquet_testing_valid_files` test continues to
compare CPU and GPU results under both native and Java reader
configurations, recovering 10 test nodes. Other issue-linked xfails in
the shared mapping are unchanged.

Validation:
- Spark 3.5 distribution and integration-test build: all 16 reactor
modules succeeded; `BUILD SUCCESS`.
- Forced pre-edit unmasked run of the five fixtures: `10 passed, 86
deselected, 12 warnings in 7.90s`.
- Focused post-edit run without `--runxfail`: `10 passed, 86 deselected,
12 warnings in 8.91s`.
- Complete `parquet_testing_test.py`: `84 passed, 4 xfailed, 8 xpassed,
90 warnings in 36.49s`.
- All 10 recovered JUnit nodes passed; the plans contained 30
`GpuFileGpuScan` occurrences and no CPU-fallback markers.
- Post-edit exemption scan: zero NVIDIA/cudf#13501 matches; the five
parameter cases are recovered while unrelated shared-map trackers
remain.

AI assistance: The change was prepared with Codex assistance and
reviewed by the author at commit
`ab12239d371d07abdd300422230a81b3eebec0ca` before submission. The PR
description was prepared with Codex assistance.

### Checklists

Documentation
- [ ] Updated for new or modified user-facing features or behaviors
- [x] No user-facing change

Testing
- [x] Added or modified tests to cover new code paths
- [ ] Covered by existing tests
(Please provide the names of the existing tests in the PR description.)
- [ ] Not required

Performance
- [ ] Tests ran and results are added in the PR description
- [ ] Issue filed with a link in the PR description
- [x] Not required

---------

Signed-off-by: Allen Xu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 - Ready to Merge Testing and reviews complete, ready to merge cuIO cuIO issue feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants