@@ -67,7 +67,7 @@ use arrow::datatypes::{Schema, SchemaRef};
6767use arrow:: { compute:: can_cast_types, datatypes:: DataType } ;
6868use async_trait:: async_trait;
6969use datafusion_common:: OuterQueryCursor ;
70- use datafusion_physical_expr:: expressions:: OuterColumn ;
70+ use datafusion_physical_expr:: expressions:: { any , OuterColumn } ;
7171use futures:: future:: BoxFuture ;
7272use futures:: { FutureExt , StreamExt , TryStreamExt } ;
7373use log:: { debug, trace} ;
@@ -112,6 +112,11 @@ fn create_physical_name(e: &Expr, is_first_expr: bool) -> Result<String> {
112112 let right = create_physical_name ( right, false ) ?;
113113 Ok ( format ! ( "{} {:?} {}" , left, op, right) )
114114 }
115+ Expr :: AnyExpr { left, op, right } => {
116+ let left = create_physical_name ( left, false ) ?;
117+ let right = create_physical_name ( right, false ) ?;
118+ Ok ( format ! ( "{} {:?} ANY({})" , left, op, right) )
119+ }
115120 Expr :: Case {
116121 expr,
117122 when_then_expr,
@@ -1096,7 +1101,6 @@ pub fn create_physical_expr(
10961101 create_physical_expr ( expr, input_dfschema, input_schema, execution_props) ?,
10971102 create_physical_expr ( key, input_dfschema, input_schema, execution_props) ?,
10981103 ) ) ) ,
1099-
11001104 Expr :: ScalarFunction { fun, args } => {
11011105 let physical_args = args
11021106 . iter ( )
@@ -1172,6 +1176,21 @@ pub fn create_physical_expr(
11721176 binary_expr
11731177 }
11741178 }
1179+ Expr :: AnyExpr { left, op, right } => {
1180+ let lhs = create_physical_expr (
1181+ left,
1182+ input_dfschema,
1183+ input_schema,
1184+ execution_props,
1185+ ) ?;
1186+ let rhs = create_physical_expr (
1187+ right,
1188+ input_dfschema,
1189+ input_schema,
1190+ execution_props,
1191+ ) ?;
1192+ any ( lhs, * op, rhs, input_schema)
1193+ }
11751194 Expr :: InList {
11761195 expr,
11771196 list,
0 commit comments