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

Fix parquet serialization #9485

Merged
merged 6 commits into from Nov 1, 2023
Merged

Conversation

Maxxen
Copy link
Member

@Maxxen Maxxen commented Oct 26, 2023

This PR adds the missing fields in ParquetCopyBind to de/serialization.

Additionally I had to implement a new case in the Deserializer to handle deserialization of unique_ptr's whose element types do not implement ::Deserialize themselves as a static member method, e.g. unique_ptr<unordered_set<idx_t>>.

Also had to format some java class or coequality would fail(?).

Closes https://github.com/duckdblabs/duckdb-internal/issues/572

@Maxxen
Copy link
Member Author

Maxxen commented Oct 26, 2023

I cannot reproduce this test succeeding locally, will try with an AWS box tomorrow.

@github-actions github-actions bot marked this pull request as draft October 27, 2023 12:16
@Maxxen Maxxen marked this pull request as ready for review October 27, 2023 19:48
@Maxxen
Copy link
Member Author

Maxxen commented Oct 27, 2023

Introduced a std::sort in the glob branch of the MultiFileReader and it seemed to fix the CSV reader problem on my fork, lets see if it works here too.

@carlopi
Copy link
Contributor

carlopi commented Oct 27, 2023

For consistency, should the sort be added also here:

		for (auto &val : ListValue::GetChildren(input)) {
			if (val.IsNull()) {
				throw ParserException("%s reader cannot take NULL input as parameter", name);
			}
			if (val.type().id() != LogicalTypeId::VARCHAR) {
				throw ParserException("%s reader can only take a list of strings as a parameter", name);
			}
			auto glob_files = fs.GlobFiles(StringValue::Get(val), context, options);
+++++++                 std::sort(glob_files.begin(), glob_files.end());
			files.insert(files.end(), glob_files.begin(), glob_files.end());
		}

so that read_csv('some/glob/**') behave the same as read_csv(['some/glob/**']) ?

@Maxxen
Copy link
Member Author

Maxxen commented Oct 29, 2023

@carlopi Good catch, fixed now!

@github-actions github-actions bot marked this pull request as draft October 29, 2023 21:08
@Maxxen Maxxen marked this pull request as ready for review October 29, 2023 21:09
@github-actions github-actions bot marked this pull request as draft October 30, 2023 09:25
@Maxxen Maxxen marked this pull request as ready for review October 30, 2023 09:25
Copy link
Contributor

@carlopi carlopi left a comment

Choose a reason for hiding this comment

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

I was curious and have given a proper look, LGTM!

@Maxxen Maxxen requested a review from Mytherin November 1, 2023 07:12
@Mytherin Mytherin merged commit 86e3ffe into duckdb:feature Nov 1, 2023
45 checks passed
@Mytherin
Copy link
Collaborator

Mytherin commented Nov 1, 2023

Thanks! LGTM

krlmlr added a commit to duckdb/duckdb-r that referenced this pull request Dec 11, 2023
Merge pull request duckdb/duckdb#9164 from Mause/feature/jdbc-uuid-param
Merge pull request duckdb/duckdb#9185 from pdet/adbc_07
Merge pull request duckdb/duckdb#9126 from Maxxen/parquet-kv-metadata
Merge pull request duckdb/duckdb#9123 from lnkuiper/parquet_schema
Merge pull request duckdb/duckdb#9086 from lnkuiper/json_inconsistent_structure
Merge pull request duckdb/duckdb#8977 from Tishj/python_readcsv_multi_v2
Merge pull request duckdb/duckdb#9279 from hawkfish/nsdate-cast
Merge pull request duckdb/duckdb#8851 from taniabogatsch/binary_lambdas
Merge pull request duckdb/duckdb#8983 from Maxxen/types/fixedsizelist
Merge pull request duckdb/duckdb#9318 from Maxxen/fix-unused
Merge pull request duckdb/duckdb#9220 from hawkfish/exclude
Merge pull request duckdb/duckdb#9230 from Maxxen/json-plan-serialization
Merge pull request duckdb/duckdb#9011 from Tmonster/add_create_statement_support_to_fuzzer
Merge pull request duckdb/duckdb#9400 from Maxxen/array-fixes
Merge pull request duckdb/duckdb#8741 from Tishj/python_import_cache_upgrade
Merge fixes
Merge pull request duckdb/duckdb#9395 from taniabogatsch/lambda-performance
Merge pull request duckdb/duckdb#9427 from Tishj/python_table_support_replacement_scan
Merge pull request duckdb/duckdb#9516 from carlopi/fixformat
Merge pull request duckdb/duckdb#9485 from Maxxen/fix-parquet-serialization
Merge pull request duckdb/duckdb#9388 from chrisiou/issue217
Merge pull request duckdb/duckdb#9565 from Maxxen/fix-array-vector-sizes
Merge pull request duckdb/duckdb#9583 from carlopi/feature
Merge pull request duckdb/duckdb#8907 from cryoEncryp/new-list-functions
Merge pull request duckdb/duckdb#8642 from Virgiel/capi-streaming-arrow
Merge pull request duckdb/duckdb#8658 from Tishj/pytype_optional
Merge pull request duckdb/duckdb#9040 from Light-City/feature/set_mg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants