-
Notifications
You must be signed in to change notification settings - Fork 85
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
Support Parquet filetype on COPY TO #1893
Merged
Merged
Conversation
This file contains 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
33a6ab4
to
4b86eff
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1893 +/- ##
==========================================
+ Coverage 90.20% 90.24% +0.04%
==========================================
Files 945 950 +5
Lines 33561 33811 +250
==========================================
+ Hits 30274 30514 +240
- Misses 3287 3297 +10
☔ View full report in Codecov by Sentry. |
4b86eff
to
542e3e0
Compare
9d4c839
to
bc3809d
Compare
8ff867d
to
eae6431
Compare
031529e
to
552c3ba
Compare
888fdb6
to
e5bd0fd
Compare
ray6080
approved these changes
Sep 10, 2023
src/include/processor/operator/persistent/parquet_file_writer.h
Outdated
Show resolved
Hide resolved
src/include/processor/operator/persistent/parquet_file_writer.h
Outdated
Show resolved
Hide resolved
a30c208
to
bd668b2
Compare
9e4a4ff
to
ea41a5f
Compare
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.
Implementation
This PR is an extension of #1716 to support copying query results to
.parquet
files. Using the arrow library, there are mainly three ways to write to parquet files (in the decreasing order of level of abstraction): usingStreamWriter
,WriteTable
andWriteBatch
(reference here).StreamWriter
doesn't support nested table, and therefore doesn't suit our needs.WriteTable
provides builders to write logical datatypes (eg, int64 builder), whereas in the low-level API we make use ofWriteBatch
to write the batch of values. The repetition and definition levels [1] [2] must be calculated in the code. This PR is concentrated on the low-level API, which gives us more flexibility in the implementation, and it's one step before we create our own parquet writer.Support
COPY (...) TO 'out.parquet'
To be addressed:
,interval
union
,,internal_id
fixed_list
andmap
data typesOnly int64 is working onvar_list
and struct, the others must be implementedFix a bug inside List>StructPerform tests on large datasets and check how the flush is actually workingBufferedRowGroup
Handle null values inside a nested data type