-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add new configuration item listing_table_ignore_subdirectory
#8565
Changes from 14 commits
df20098
424d665
b2d288a
945bf17
bbeffd7
abb7650
e69183b
36e0c8d
aff207f
7a7c8f8
e745b91
3ee2e61
9ea237c
5632324
fe52098
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,3 +63,26 @@ id6 value"6 | |
id7 value"7 | ||
id8 value"8 | ||
id9 value"9 | ||
|
||
|
||
# When reading a partitioned table, `listing_table_ignore_subdirectory` is always equal to false, even if set to true | ||
statement ok | ||
set datafusion.execution.listing_table_ignore_subdirectory = true; | ||
|
||
statement ok | ||
CREATE EXTERNAL TABLE partition_csv_table ( | ||
name VARCHAR, | ||
ts TIMESTAMP, | ||
c_date DATE, | ||
) | ||
STORED AS CSV | ||
PARTITIONED BY (c_date) | ||
LOCATION '../core/tests/data/partitioned_table'; | ||
|
||
query I | ||
select count(*) from partition_csv_table; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand what this test is testing -- in both cases the table has 4 rows (aka there is no data in a subdirectory to ignore, right)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When reading a partitioned table, |
||
---- | ||
4 | ||
|
||
statement ok | ||
DROP TABLE partition_csv_table |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -276,6 +276,39 @@ LIMIT 10; | |
0 2014-08-27T14:00:00Z Timestamp(Millisecond, Some("UTC")) | ||
0 2014-08-27T14:00:00Z Timestamp(Millisecond, Some("UTC")) | ||
|
||
# Test config listing_table_ignore_subdirectory: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
|
||
query ITID | ||
COPY (SELECT * FROM src_table WHERE int_col > 6 LIMIT 3) | ||
TO 'test_files/scratch/parquet/test_table/subdir/3.parquet' | ||
(FORMAT PARQUET, SINGLE_FILE_OUTPUT true); | ||
---- | ||
3 | ||
|
||
statement ok | ||
CREATE EXTERNAL TABLE listing_table | ||
STORED AS PARQUET | ||
WITH HEADER ROW | ||
LOCATION 'test_files/scratch/parquet/test_table/*.parquet'; | ||
|
||
statement ok | ||
set datafusion.execution.listing_table_ignore_subdirectory = true; | ||
|
||
# scan file: 0.parquet 1.parquet 2.parquet | ||
query I | ||
select count(*) from listing_table; | ||
---- | ||
9 | ||
|
||
statement ok | ||
set datafusion.execution.listing_table_ignore_subdirectory = false; | ||
|
||
# scan file: 0.parquet 1.parquet 2.parquet 3.parquet | ||
query I | ||
select count(*) from listing_table; | ||
---- | ||
12 | ||
|
||
# Clean up | ||
statement ok | ||
DROP TABLE timestamp_with_tz; | ||
|
@@ -319,3 +352,7 @@ SELECT int64_list, utf8_list FROM list_columns | |
|
||
statement ok | ||
DROP TABLE list_columns; | ||
|
||
# Clean up | ||
statement ok | ||
DROP TABLE listing_table; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the description information, do you agree? @alamb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what this is trying to say 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, got it -- thank you -- I will propose a clarification in a follow on PR