Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-42102: [C++][Parquet] Add binary that extracts a footer from a parquet file #42174

Merged
merged 26 commits into from
Jul 22, 2024

Conversation

alkis
Copy link
Contributor

@alkis alkis commented Jun 17, 2024

Rationale for this change

This binary will make it a lot easier for customers to share their parquet metadata with the community so that we can build a repository of footers that can be used for advancing the state of metadata in parquet.

What changes are included in this PR?

Usage from the file binary itself:

Usage: parquet-dump-footer
  -h|--help    Print help and exit
  --no-scrub   Do not scrub potentially confidential metadata
  --debug      Output text represenation of footer for inspection
  --in <uri>   Input file (required): must be an URI or an absolute local path
  --out <path> Output file (optional, default stdout)

  Dump the footer of a Parquet file to stdout or to a file, optionally with
  potentially confidential metadata scrubbed.

Are these changes tested?

Manually on existing parquet files.

Are there any user-facing changes?

No.

Copy link

⚠️ GitHub issue #42102 has been automatically assigned in GitHub to PR creator.

cpp/tools/parquet/parquet_dump_footer.cc Outdated Show resolved Hide resolved
cpp/tools/parquet/parquet_dump_footer.cc Outdated Show resolved Hide resolved
cpp/tools/parquet/parquet_dump_footer.cc Outdated Show resolved Hide resolved
@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Jun 17, 2024
@github-actions github-actions bot added awaiting changes Awaiting changes awaiting change review Awaiting change review and removed awaiting committer review Awaiting committer review awaiting changes Awaiting changes labels Jun 17, 2024
@alkis alkis force-pushed the dump-footer branch 7 times, most recently from 2a86a42 to d6d3657 Compare June 19, 2024 10:03
@alkis
Copy link
Contributor Author

alkis commented Jun 19, 2024

Windows build keeps failing. Could you advice? It seems it can't find library arrow_static to link to.

@emkornfield
Copy link
Contributor

Just a high-level comment on usability. I don't think any binaries are currently packaged in release channels so if we want this to be easier to use we should consider embedding it in the library with python bindings

@alkis
Copy link
Contributor Author

alkis commented Jun 20, 2024

Just a high-level comment on usability. I don't think any binaries are currently packaged in release channels so if we want this to be easier to use we should consider embedding it in the library with python bindings

You mean writing this in python and shipping as a python script?

@kou
Copy link
Member

kou commented Jun 20, 2024

I don't think any binaries are currently packaged in release channels

FYI: deb and RPM include binaries:

@emkornfield
Copy link
Contributor

I don't think any binaries are currently packaged in release channels

FYI: deb and RPM include binaries:

I didn't realize this. I guess I was thinking of the pyarrow/R libraries as the primary distribution source.

You mean writing this in python and shipping as a python script?

I was thinking of just include the functionality in the pyarrow arrow library by including C++ as part of the library and wrapping in python. given that there is some packaging that does include the binaries this might be less of an issue.

@alkis
Copy link
Contributor Author

alkis commented Jun 21, 2024

Given that tools are packages in deb and rpm this covers the majority of linux.

@alkis
Copy link
Contributor Author

alkis commented Jun 25, 2024

Is this ready for merge?

Copy link
Member

@mapleFU mapleFU left a comment

Choose a reason for hiding this comment

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

General looks ok to me, so this patch would extract a footer with "scrub" might be used?

cpp/tools/parquet/parquet_dump_footer.cc Show resolved Hide resolved
cpp/tools/parquet/parquet_dump_footer.cc Show resolved Hide resolved
cpp/tools/parquet/parquet_dump_footer.cc Outdated Show resolved Hide resolved
cpp/tools/parquet/parquet_dump_footer.cc Outdated Show resolved Hide resolved
@alkis
Copy link
Contributor Author

alkis commented Jun 25, 2024

General looks ok to me, so this patch would extract a footer with "scrub" might be used?

Yes, the purpose is to build a repository of large/slow to parse footers and guide the design of better parquet metadata representation.

@kou kou changed the title GH-42102: [C++] Add binary that extracts a footer from a parquet file GH-42102: [C++][Parquet] Add binary that extracts a footer from a parquet file Jun 25, 2024
@alkis
Copy link
Contributor Author

alkis commented Jul 2, 2024

Friendly ping. Can this be merged?

@mapleFU mapleFU requested a review from pitrou July 2, 2024 08:46
@pitrou
Copy link
Member

pitrou commented Jul 22, 2024

@github-actions crossbow submit -g cpp

This comment was marked as outdated.

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

LGTM. @alkis could you review the changes I've made to make sure they're ok to you?

@alkis
Copy link
Contributor Author

alkis commented Jul 22, 2024

LGTM. @alkis could you review the changes I've made to make sure they're ok to you?

Thanks a ton for the fixes! I reverted the JSON fix and named the optional properly as --debug. I wanted that option for folks to be able to inspect what's going to be the output of the command before donating a footer to us for benchmarking use.

@pitrou
Copy link
Member

pitrou commented Jul 22, 2024

Ah, fair enough.

@pitrou
Copy link
Member

pitrou commented Jul 22, 2024

@github-actions crossbow submit -g cpp

Copy link

Revision: 44f9768

Submitted crossbow builds: ursacomputing/crossbow @ actions-366196b72e

Task Status
test-alpine-linux-cpp GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-cuda-cpp GitHub Actions
test-debian-12-cpp-amd64 GitHub Actions
test-debian-12-cpp-i386 GitHub Actions
test-fedora-39-cpp GitHub Actions
test-ubuntu-20.04-cpp GitHub Actions
test-ubuntu-20.04-cpp-bundled GitHub Actions
test-ubuntu-20.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-20.04-cpp-thread-sanitizer GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-20 GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions

@alkis
Copy link
Contributor Author

alkis commented Jul 22, 2024

I have one more nit coming in.

@pitrou
Copy link
Member

pitrou commented Jul 22, 2024

Thanks @alkis . I'm waiting for CI and will merge if ok.

@pitrou pitrou merged commit d21a924 into apache:main Jul 22, 2024
35 checks passed
@pitrou pitrou removed the awaiting change review Awaiting change review label Jul 22, 2024
@alkis alkis deleted the dump-footer branch July 22, 2024 15:04
cpp/tools/parquet/CMakeLists.txt Show resolved Hide resolved
cpp/src/parquet/metadata.cc Show resolved Hide resolved
cpp/tools/parquet/parquet_dump_footer.cc Show resolved Hide resolved
cpp/tools/parquet/parquet_dump_footer.cc Show resolved Hide resolved
Copy link

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit d21a924.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 4 possible false positives for unstable benchmarks that are known to sometimes produce them.

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.

5 participants