feat: Add named parameter support for DuckDB read_parquet#5563
Merged
feat: Add named parameter support for DuckDB read_parquet#5563
Conversation
Add support for DuckDB's read_parquet optional boolean parameters: - binary_as_string: Load binary columns as strings - file_row_number: Include file_row_number column - hive_partitioning: Interpret path as Hive partitioned - union_by_name: Union columns by name instead of position Note: The 'filename' parameter was excluded as it's deprecated since DuckDB v1.3.0 (automatically added as virtual column). Fixes PRQL#5548 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The read_parquet function now explicitly outputs all parameters with their default values in the generated SQL, making the behavior more transparent. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
Adds support for DuckDB's
read_parquetoptional boolean parameters to address issue #5548.Users can now control DuckDB-specific behavior when reading Parquet files:
Changes
Added 4 optional boolean parameters to
read_parquetfunction:binary_as_string(default: false) - Load binary columns as stringsfile_row_number(default: false) - Include file_row_number columnhive_partitioning(default: null) - Interpret path as Hive partitionedunion_by_name(default: false) - Union columns by name instead of positionNote: The
filenameparameter was intentionally excluded as it's deprecated since DuckDB v1.3.0 (automatically added as a virtual column)Implementation Details
std.prqlwith defaultsstd.sql.prqlmaps parameters to DuckDB's SQL named argumentssource(consistent with PRQL's dialect handling)Test Results
Example SQL Output
Fixes #5548
🤖 Generated with Claude Code