Ted-Jiang commented on a change in pull request #1665: URL: https://github.com/apache/arrow-datafusion/pull/1665#discussion_r792390508
########## File path: datafusion/src/datasource/object_store/mod.rs ########## @@ -159,6 +159,16 @@ pub trait ObjectStore: Sync + Send + Debug { /// Get object reader for one file fn file_reader(&self, file: SizedFile) -> Result<Arc<dyn ObjectReader>>; } +/// Checks if we should filter out this path name +/// https://github.com/apache/spark/blob/5b91381b9bcea27b7be6d9cef852efbd6c23d98a/core/src/main/scala/org/apache/spark/util/HadoopFSUtils.scala#L358 +fn do_path_filter_with_suffix(path: &str, suffix: &str) -> bool { + let exclude = path.starts_with('_') && !path.contains('=') + || path.starts_with('.') + || path.ends_with("._COPYING_"); Review comment: @houqp thanks a lot for your kindly advice! i have find the path of `datafusion-cli` read parquet file. https://github.com/apache/arrow-datafusion/blob/7153fac7d8ff77c71a67cd2ba3ec55d94a4cd794/datafusion/src/execution/context.rs#L227 before: ` ❯ create external table cus stored as PARQUET location '~project/DataFusion/benchmarks/benchmarks/data/tpch-1g-oneFile/customer'; ParquetError(General("Invalid Parquet file. Corrupt footer")) after fix ❯ create external table cus stored as PARQUET location '~project/DataFusion/benchmarks/benchmarks/data/tpch-1g-oneFile/customer' 0 rows in set. Query took 0.007 seconds. -- 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...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org