XiangpengHao opened a new issue, #19914:
URL: https://github.com/apache/datafusion/issues/19914
### Describe the bug
While working on DataFusion vector search, I found a potential bug:
This test case will panic (put in
datafusion/core/tests/user_defined/user_defined_table_functions.rs)
```rust
#[tokio::test]
async fn test_udtf_array_type_coercion() -> Result<()> {
let ctx = SessionContext::new();
ctx.register_udtf("f", Arc::new(SimpleCsvTableFunc {}));
let _ = ctx.sql("SELECT * FROM f(ARRAY[0.1, 1, 2])").await?;
Ok(())
}
```
I believe the fix is to add `simplifier.coerce()` before this line:
https://github.com/apache/datafusion/blob/dededf7c78d587afc662c8a06fb949a0bf4d457f/datafusion/core/src/execution/session_state.rs#L1848
### To Reproduce
_No response_
### Expected behavior
_No response_
### Additional context
_No response_
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]