This is an automated email from the ASF dual-hosted git repository.

rui-mo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 5dce37f4ab [GLUTEN-13545][VL] Pass the Substrait Rel by reference in 
convertSingleInput (#13551)
5dce37f4ab is described below

commit 5dce37f4ab54d4fc674818b3856802670de1054c
Author: YangJie <[email protected]>
AuthorDate: Fri Nov 13 18:13:00 2026 -0500

    [GLUTEN-13545][VL] Pass the Substrait Rel by reference in 
convertSingleInput (#13551)
---
 cpp/velox/substrait/SubstraitToVeloxPlan.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cpp/velox/substrait/SubstraitToVeloxPlan.h 
b/cpp/velox/substrait/SubstraitToVeloxPlan.h
index 281cdd22bd..fd61331a6c 100644
--- a/cpp/velox/substrait/SubstraitToVeloxPlan.h
+++ b/cpp/velox/substrait/SubstraitToVeloxPlan.h
@@ -279,8 +279,11 @@ class SubstraitToVeloxPlanConverter {
       const core::AggregationNode::Step& aggStep);
 
   /// Helper function to convert the input of Substrait Rel to Velox Node.
+  /// Takes the Rel by reference: the protobuf message owns the whole input
+  /// subtree, and passing by value deep-copied it once per node on the chain
+  /// (O(depth^2) total over a plan).
   template <typename T>
-  core::PlanNodePtr convertSingleInput(T rel) {
+  core::PlanNodePtr convertSingleInput(const T& rel) {
     VELOX_CHECK(rel.has_input(), "Child Rel is expected here.");
     return toVeloxPlan(rel.input());
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to