BlakeOrth commented on code in PR #17232:
URL: https://github.com/apache/datafusion/pull/17232#discussion_r2283545799
##########
datafusion/core/src/datasource/listing/table.rs:
##########
@@ -802,6 +802,9 @@ impl ListingOptions {
.rev()
.skip(1) // get parents only; skip the file itself
.rev()
+ // Partitions are expected to follow the format
"column_name=value", so we
+ // should ignore any path part that cannot be parsed into
the expected format
+ .filter(|s| s.contains('='))
Review Comment:
This code is necessary to prevent regressions exposed by existing `sqllogic`
tests. Here's the failures from existing tests for this PR if this fix is not
included
```
Completed 345 test files in 17 seconds
External error: 6 errors in file
/home/blake/open_source_src/datafusion-BlakeOrth/datafusion/sqllogictest/test_files/parquet.slt
1. statement failed: DataFusion error: Error during planning: Found mixed
partition values on disk [[], ["subdir"]]
[SQL] CREATE EXTERNAL TABLE listing_table_folder_0
STORED AS PARQUET
LOCATION 'test_files/scratch/parquet/test_table/';
at
/home/blake/open_source_src/datafusion-BlakeOrth/datafusion/sqllogictest/test_files/parquet.slt:306
2. query failed: DataFusion error: Error during planning: table
'datafusion.public.listing_table_folder_0' not found
[SQL] select count(*) from listing_table_folder_0;
at
/home/blake/open_source_src/datafusion-BlakeOrth/datafusion/sqllogictest/test_files/parquet.slt:315
3. query failed: DataFusion error: Error during planning: table
'datafusion.public.listing_table_folder_0' not found
[SQL] select count(*) from listing_table_folder_0;
at
/home/blake/open_source_src/datafusion-BlakeOrth/datafusion/sqllogictest/test_files/parquet.slt:324
4. statement failed: DataFusion error: Error during planning: Found mixed
partition values on disk [[], ["subdir"]]
[SQL] CREATE EXTERNAL TABLE listing_table_folder_1
STORED AS PARQUET
LOCATION 'test_files/scratch/parquet/test_table';
at
/home/blake/open_source_src/datafusion-BlakeOrth/datafusion/sqllogictest/test_files/parquet.slt:330
5. query failed: DataFusion error: Error during planning: table
'datafusion.public.listing_table_folder_1' not found
[SQL] select count(*) from listing_table_folder_1;
at
/home/blake/open_source_src/datafusion-BlakeOrth/datafusion/sqllogictest/test_files/parquet.slt:339
6. query failed: DataFusion error: Error during planning: table
'datafusion.public.listing_table_folder_1' not found
[SQL] select count(*) from listing_table_folder_1;
at
/home/blake/open_source_src/datafusion-BlakeOrth/datafusion/sqllogictest/test_files/parquet.slt:348
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]