andygrove commented on code in PR #1494: URL: https://github.com/apache/datafusion-comet/pull/1494#discussion_r1990002483
########## native/core/src/execution/planner.rs: ########## @@ -1208,7 +1208,18 @@ impl PhysicalPlanner { // By default, local FS object store registered // if `hdfs` feature enabled then HDFS file object store registered - let object_store_url = register_object_store(Arc::clone(&self.session_ctx))?; + // Get one file from the list of files + let one_file = scan + .file_partitions + .first() + .unwrap() + .partitioned_file + .first() + .unwrap() + .file_path + .clone(); Review Comment: We can avoid the unwraps here and add error handling: ```suggestion let one_file = scan .file_partitions .first() .and_then(|f| f.partitioned_file.first()) .map(|f| f.file_path.clone()) .ok_or(ExecutionError::GeneralError( "Failed to locate file".to_string(), ))?; ``` -- 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