-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Describe the bug
I am testing Ballista with DataFusion 33 and getting this confusing error:
File 'supplier.parquet' does not match the expected extension '.parquet'
I am pretty sure that supplier.parquet does end with .parquet.
Here is the code that produces this error message:
let file_name = path.prefix().filename().unwrap_or_default();
if !path.as_str().ends_with(&option_extension) && file_name.contains('.') {
return exec_err!(
"File '{file_name}' does not match the expected extension '{option_extension}'"
);
}The code checks to see if path.as_str() ends with the extension, but the error message shows file_name instead of path.as_str(), so this seems to be misleading. I think it would be better to also show the value of path.as_str() in the error message to make this easier to debug.
I also wonder whether it is intentional that we are checking path.as_str() rather than file_name?
To Reproduce
This is not easy to reproduce via Ballista.
Expected behavior
I expect the error message to give me all of the context necessary so that I can debug the issue (which may well be due to a Ballista bug in this case).
Additional context
No response