You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/12/14 15:50:39 UTC

[GitHub] [arrow-datafusion] alamb opened a new issue #1447: Error on some queries: "column types must match schema types, expected XXX but found YYY"

alamb opened a new issue #1447:
URL: https://github.com/apache/arrow-datafusion/issues/1447


   **Describe the bug**
   Some queries error with an error like
   ```
   ArrowError(ExternalError(ArrowError(InvalidArgumentError("column types must match schema types, expected Boolean but found Float32 at column index 0"))))', datafusion/tests/sql.rs:3857:39
   ```
   
   **To Reproduce**
   Write a query that aliases one column to the name of another in the input that has a different type
   
   Specifically:
   
   A reproducer in sql.rs:
   ```rust
   #[tokio::test]
   async fn projection_type_alias() -> Result<()> {
       let mut ctx = ExecutionContext::new();
       register_aggregate_simple_csv(&mut ctx).await?;
   
       // Query that aliases one column to the name of a different column
       // that also has a different type (c1 == float32, c3 == boolean)
       let sql = "SELECT c1 as c3 FROM aggregate_simple ORDER BY c3";
       let actual = execute_to_batches(&mut ctx, sql).await;
   
       let expected = vec!["foo"];
       assert_batches_eq!(expected, &actual);
   
       Ok(())
   }
   ```
   
   **Expected behavior**
   Query should run successfully
   
   **Additional context**
   This bug was caught by some of the IOx tests while updating IOx https://github.com/influxdata/influxdb_iox/pull/3359
   
   I am pretty sure the issue was intrduced in https://github.com/apache/arrow-datafusion/pull/1378. I'll have a PR shortly


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-datafusion] alamb closed issue #1447: Error on some queries: "column types must match schema types, expected XXX but found YYY"

Posted by GitBox <gi...@apache.org>.
alamb closed issue #1447:
URL: https://github.com/apache/arrow-datafusion/issues/1447


   


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org