collimarco opened a new issue, #6732:
URL: https://github.com/apache/arrow-datafusion/issues/6732

   ### Describe the bug
   
   An SQL query on multiple Parquet files doesn't work.
   
   
   ### To Reproduce
   
   This is the code:
   
   ```
   use datafusion::datasource::file_format::file_type::{FileType, GetExt};
   use datafusion::datasource::file_format::parquet::ParquetFormat;
   use datafusion::datasource::listing::ListingOptions;
   use datafusion::error::Result;
   use datafusion::prelude::*;
   use std::sync::Arc;
   
   /// This example demonstrates executing a simple query against an Arrow data 
source (a directory
   /// with multiple Parquet files) and fetching results
   #[tokio::main]
   async fn main() -> Result<()> {
       let ctx = SessionContext::new();
       let testdata = "/Users/example/Desktop/data_bucket";
       let file_format = 
ParquetFormat::default().with_enable_pruning(Some(true));
       let listing_options = ListingOptions::new(Arc::new(file_format))
           .with_file_extension(FileType::PARQUET.get_ext());
   
       ctx.register_listing_table(
           "my_table",
           &format!("file://{testdata}"),
           listing_options,
           None,
           None,
       )
       .await
       .unwrap();
   
       let df = ctx
           .sql("SELECT * FROM my_table LIMIT 10")
           .await?;
   
       df.show().await?;
   
       Ok(())
   }
   ```
   
   And you need a directory with some Parquet files 
("/Users/example/Desktop/data_bucket").
   
   ### Expected behavior
   
   You get a result and some rows are printed
   
   ### Additional context
   
   You only get:
   
   ```
   ++
   ++
   ```
   
   The build and execution however is successful, meaning that no error is 
displayed.
   
   I am using MacOS for testing.


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