andygrove opened a new issue, #8264:
URL: https://github.com/apache/arrow-datafusion/issues/8264

   ### 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:
   
   ```rust
   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_


-- 
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]

Reply via email to