Conversation
This was referenced May 24, 2023
alamb
approved these changes
May 24, 2023
Contributor
alamb
left a comment
There was a problem hiding this comment.
I recommend adding a doc comment from append_column added in #4269 to this binary as an example of how to use it
I tested this out with some local parquet data:
parquet-concat combined.parquet 1.parquet 2.parquet
(arrow_dev) alamb@MacBook-Pro-8:~/Downloads$ du -s -h 1.parquet 2.parquet combined.parquet
69M 1.parquet
40K 2.parquet
69M combined.parquet+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 9332578 |
+-----------------+
1 row in set. Query took 0.007 seconds.
❯ select count(*) from '2.parquet';
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 637 |
+-----------------+
❯ select count(*) from 'combined.parquet';
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 9333215 |
+-----------------+
❯ select avg(value) from (select value from '1.parquet' UNION ALL select value from '2.parquet');
+----------------------+
| AVG(1.parquet.value) |
+----------------------+
| 82.11578603943015 |
+----------------------+
1 row in set. Query took 0.035 seconds.
❯ select avg(value) from 'combined.parquet';
+-----------------------------+
| AVG(combined.parquet.value) |
+-----------------------------+
| 82.11578603943015 |
+-----------------------------+
1 row in set. Query took 0.015 seconds.Works great for me 🚀
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #.
Rationale for this change
Adds a CLI tool for efficiently concatenating parquet files, this definitely could be made more sophisticated, but serves as a demo of how to use the new API added in #4269 whilst also providing some utility to users
What changes are included in this PR?
Are there any user-facing changes?