devinjdangelo commented on code in PR #7336:
URL: https://github.com/apache/arrow-datafusion/pull/7336#discussion_r1300799034


##########
datafusion/common/src/file_type.rs:
##########
@@ -281,18 +311,18 @@ impl FileType {
             FileType::JSON | FileType::CSV => Ok(format!("{}{}", ext, 
c.get_ext())),
             FileType::PARQUET | FileType::AVRO | FileType::ARROW => match 
c.variant {
                 UNCOMPRESSED => Ok(ext),
-                _ => internal_err!(
-                    "FileCompressionType can be specified for CSV/JSON 
FileType."
-                ),
+                _ => Err(DataFusionError::Internal(

Review Comment:
   I tried to go back over this file and use the macro, but ran into some 
issues. Took a while to figure out you can't import it within the same crate, 
but have to specify it like:
   
   `crate::error::_not_impl_err!`
   
   In places where `?` is used in combination with the macro e.g. 
   
   `crate::error::_not_impl_err!("message")?`
   
   I was getting a cannot convert into DataFusionError compiler message. 🤔 



##########
datafusion/common/src/file_type.rs:
##########
@@ -281,18 +311,18 @@ impl FileType {
             FileType::JSON | FileType::CSV => Ok(format!("{}{}", ext, 
c.get_ext())),
             FileType::PARQUET | FileType::AVRO | FileType::ARROW => match 
c.variant {
                 UNCOMPRESSED => Ok(ext),
-                _ => internal_err!(
-                    "FileCompressionType can be specified for CSV/JSON 
FileType."
-                ),
+                _ => Err(DataFusionError::Internal(

Review Comment:
   I tried to go back over this file and use the macro, but ran into some 
issues. Took a while to figure out you can't import it within the same crate, 
but have to specify it like:
   
   `crate::error::_not_impl_err!`
   
   In places where `?` is used in combination with the macro e.g. 
   
   `crate::error::_not_impl_err!("message")?`
   
   I was getting a cannot convert into DataFusionError compiler message. 🤔 



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