metesynnada commented on code in PR #4694:
URL: https://github.com/apache/arrow-datafusion/pull/4694#discussion_r1058164918
##########
datafusion/core/src/execution/context.rs:
##########
@@ -689,13 +684,10 @@ impl SessionContext {
let table_path = ListingTableUrl::parse(table_path)?;
let target_partitions = self.copied_config().target_partitions();
let listing_options = options.to_listing_options(target_partitions);
- let resolved_schema = match options.schema {
- Some(s) => Arc::new(s.to_owned()),
- None => {
- listing_options
- .infer_schema(&self.state(), &table_path)
- .await?
- }
+ let resolved_schema = match (options.schema, options.infinite) {
+ (Some(s), _) => Arc::new(s.to_owned()),
+ (None, false) => listing_options.infer_schema(&self.state(),
&table_path).await?,
+ (None, true) => return Err(DataFusionError::Plan("Currently, we do
not support schema inference for infinite data sources.".to_string()))
};
Review Comment:
If we are open to an API change, I can undo my changes on `register_avro`
and `register_json` and a future PR can resolve these issues in the future.
--
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]