westonpace commented on issue #10181:
URL: https://github.com/apache/datafusion/issues/10181#issuecomment-2070887996
I think I'd be happy with 2. The example you linked is how we are using
datafusion. Here is an updated example that fails with the error:
```
// For example, let's say you have some integers in an array
let b = Arc::new(Int32Array::from(vec![4, 5, 6, 7, 8, 7, 4]));
let a = Arc::new(StructArray::new(
vec![Field::new("b", DataType::Int32, false)].into(),
vec![b],
None,
));
let batch = RecordBatch::try_from_iter([("a", a as _)])?;
// If you want to find all rows where the expression `a < 5 OR a = 8` is
true
let expr = col("a")
.field("b")
.lt(lit(5))
.or(col("a").field("b").eq(lit(8)));
// First, you make a "physical expression" from the logical `Expr`
let physical_expr = physical_expr(&batch.schema(), expr)?;
```
--
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]