BlakeOrth commented on code in PR #17050: URL: https://github.com/apache/datafusion/pull/17050#discussion_r2267866958
########## datafusion/core/src/datasource/listing/table.rs: ########## @@ -802,6 +802,7 @@ impl ListingOptions { .rev() .skip(1) // get parents only; skip the file itself .rev() + .filter(|s| s.contains('=')) Review Comment: I've updated this with a comment for clarity, however, while looking at this I did think of another option. I think it's mostly a matter of style preference, but this code could also be updated to use `filter_map` instead of filter and then map, which might add clarity through function names rather than necessitating an in-line comment. ```rust // . . . path_parts .into_iter() .rev() .skip(1) .rev() .filter_map(column_name_from_hive) .collect_vec() // . . . fn column_name_from_hive(path_part: &str) -> Option<String> { // validation and parsing logic } ``` -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org