vbarua commented on code in PR #15794:
URL: https://github.com/apache/datafusion/pull/15794#discussion_r2067610862


##########
datafusion/substrait/src/logical_plan/consumer/rex/extended_expression.rs:
##########
@@ -0,0 +1,109 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use crate::extensions::Extensions;
+use crate::logical_plan::consumer::utils::rename_field;
+use crate::logical_plan::consumer::{
+    from_substrait_named_struct, DefaultSubstraitConsumer, SubstraitConsumer,
+};
+use datafusion::arrow::datatypes::Field;
+use datafusion::common::{not_impl_err, plan_err, DFSchemaRef};
+use datafusion::execution::SessionState;
+use datafusion::logical_expr::{Expr, ExprSchemable};
+use substrait::proto::expression_reference::ExprType;
+use substrait::proto::ExtendedExpression;
+
+/// Convert Substrait ExtendedExpression to ExprContainer
+///
+/// A Substrait ExtendedExpression message contains one or more expressions,
+/// with names for the outputs, and an input schema.  These pieces are all 
included
+/// in the ExprContainer.
+///
+/// This is a top-level message and can be used to send expressions (not plans)
+/// between systems.  This is often useful for scenarios like pushdown where 
filter
+/// expressions need to be sent to remote systems.
+pub async fn from_substrait_extended_expr(

Review Comment:
   minor: I would suggest that we put this in `mod.rs`. The Substrait 
[ExtendedExpression](https://github.com/substrait-io/substrait/blob/main/proto/substrait/extended_expression.proto)
 isn't really an expression variant, it's closer to a Plan. 
   
   Another way of thinking about this is that `from_substrait_extended_expr` 
should be in `rex/mod.rs` for the same reason that `from_substrait_rel` is in 
`rel/mod.rs`



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to