Skip to content

Conversation

piever
Copy link
Contributor

@piever piever commented Sep 17, 2024

On main branch, Tables.partitions fails on table with more than 10 columns. The (somewhat convoluted) reason is that julia ntuple function when fed a UInt64 as second argument, casts it to Int only if it is <= 10 (see JuliaLang/julia#55790). This works in our favor for small n (number of columns), as the function ColumnConversionData expects a Int, not a UInt64, but for larger n attempting to collect a Tables.partitions fails.

The first commits is a minimal fix + test, whereas the second commit also adds a small refactor to simplify code and make it more robust to this.

@duckdb-draftbot duckdb-draftbot marked this pull request as draft September 17, 2024 11:27
@piever piever marked this pull request as ready for review September 17, 2024 11:28
@Mytherin Mytherin merged commit 6b7d3ec into duckdb:main Sep 17, 2024
8 checks passed
@Mytherin
Copy link
Collaborator

Thanks!

@piever piever deleted the pv/partitions branch September 17, 2024 13:06
github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Sep 27, 2024
[Fix] Throw exception for UNNEST in lambdas (duckdb/duckdb#13969)
Fix partitions on wide tables (duckdb/duckdb#13988)
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Sep 27, 2024
[Fix] Throw exception for UNNEST in lambdas (duckdb/duckdb#13969)
Fix partitions on wide tables (duckdb/duckdb#13988)

Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
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.

2 participants