wangxiaoying opened a new issue, #2225:
URL: https://github.com/apache/arrow-datafusion/issues/2225
**Describe the bug**
The `sql` function will throw an error: ` Plan("'LargeUtf8 = Utf8' can't be
evaluated because there isn't a common type to coerce the types to")` when
filtering on a `LargeUtf8` column.
**To Reproduce**
```Rust
fn main() {
let id_array = Int32Array::from(vec![1, 2, 3, 4, 5]);
let lrgstr_array = LargeStringArray::from(vec!["1", "2", "3", "4", "5"]);
let schema = Schema::new(vec![
Field::new("id", DataType::Int32, false),
Field::new("lrgstr", DataType::LargeUtf8, false),
]);
let batch = RecordBatch::try_new(
Arc::new(schema),
vec![
Arc::new(id_array),
Arc::new(lrgstr_array),
],
)
.unwrap();
let mut ctx = ExecutionContext::new();
let db1 = MemTable::try_new(batch.schema(), vec![vec![batch]]).unwrap();
let sql = "select * from t1 where lrgstr = '1'";
ctx.register_table("t1", Arc::new(db1)).unwrap();
let rt = Arc::new(tokio::runtime::Runtime::new().expect("Failed to
create runtime"));
let df = rt.block_on(ctx.sql(sql)).unwrap();
}
```
**Expected behavior**
No error.
**Additional context**
Add any other context about the problem here.
--
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]