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

   **Describe the bug**
   `read_from_registered_table_with_glob_path` fails locally for me when 
running as part of `cargo test` but works fine in the IDE.
   
   I added some debug logging:
   
   ``` rust
   #[tokio::test]
   async fn read_from_registered_table_with_glob_path() -> Result<()> {
       let ctx = SessionContext::new();
   
       ctx.register_parquet(
           "test",
           &format!("{}/alltypes_plain*.parquet", parquet_test_data()),
           ParquetReadOptions::default(),
       )
       .await?;
       let df = ctx.sql("SELECT * FROM test").await?;
       let results = df.collect().await?;
       println!("before fetch results");
       let total_rows: usize = results.iter().map(|rb| {
           println!("received batch with {} rows", rb.num_rows());
           rb.num_rows()
       }).sum();
       println!("after fetch results");
       // alltypes_plain.parquet = 8 rows, alltypes_plain.snappy.parquet = 2 
rows, alltypes_dictionary.parquet = 2 rows
       assert_eq!(total_rows, 10);
       Ok(())
   }
   ```
   
   # cargo test run:
   
   ```
   before fetch results
   after fetch results
   thread 
'execution::context::tests::read_from_registered_table_with_glob_path' panicked 
at 'assertion failed: `(left == right)`
     left: `0`,
    right: `10`', datafusion/core/src/execution/context.rs:2167:9
   
   ```
   
   # IDE result
   
   ```
   before fetch results
   received batch with 2 rows
   received batch with 8 rows
   after fetch results
   ```
   
   
   **To Reproduce**
   Run the test.
   
   **Expected behavior**
   Same result every time.
   
   **Additional context**
   None
   


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