oridag opened a new issue, #6597:
URL: https://github.com/apache/arrow-datafusion/issues/6597
### Describe the bug
Same as title
### To Reproduce
```rust
use datafusion::prelude::*;
use datafusion_expr::BuiltinScalarFunction;
#[tokio::main]
async fn main() -> datafusion::error::Result<()> {
let ctx = SessionContext::new();
ctx.register_csv("example", "tests/data/example.csv",
CsvReadOptions::new()).await?;
let df = ctx.table("example").await?;
let f = Expr::ScalarFunction(datafusion_expr::expr::ScalarFunction {
fun: BuiltinScalarFunction::Struct,
args: vec![col("a"), col("b")],
});
let df2 = df.select(vec![f])?;
df2.show().await?;
Ok(())
}
```
### Expected behavior
No error
### Additional context
Returns the following error:
```
Error: ArrowError(InvalidArgumentError("column types must match schema
types, expected Struct([]) but found Struct([Field { name: \"c0\", data_type:
Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} },
Field { name: \"c1\", data_type: Int64, nullable: true, dict_id: 0,
dict_is_ordered: false, metadata: {} }]) at column index 0"))
```
--
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]