berkaysynnada commented on code in PR #10404: URL: https://github.com/apache/datafusion/pull/10404#discussion_r1597969687
########## datafusion/core/src/datasource/stream.rs: ########## @@ -58,12 +58,22 @@ impl TableProviderFactory for StreamTableFactory { let schema: SchemaRef = Arc::new(cmd.schema.as_ref().into()); let location = cmd.location.clone(); let encoding = cmd.file_type.parse()?; + let header = if let Ok(opt) = cmd + .options + .get("format.has_header") + .map(|has_header| bool::from_str(has_header)) + .transpose() + { + opt.unwrap_or(false) + } else { + return config_err!("format.has_header can either be true or false"); Review Comment: An error occurs here if the user would set such an option: ('format.has_header' 'x') where x is anything other than 'true' or 'false'. I'd like to emphasize that. But as you said, the message may direct the user as if a conflicting options are set. Thanks for the feedback, I am updating it now. -- 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