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

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


The following commit(s) were added to refs/heads/main by this push:
     new fd5fbbb5b7 [VL] Allocate VarChar sub-messages on protobuf arena in 
VeloxToSubstraitExpr (#11636)
fd5fbbb5b7 is described below

commit fd5fbbb5b7cec52bafb9c67d2b9fd5086a9064df
Author: Ankita Victor <[email protected]>
AuthorDate: Mon Mar 9 14:46:43 2026 +0530

    [VL] Allocate VarChar sub-messages on protobuf arena in 
VeloxToSubstraitExpr (#11636)
---
 cpp/velox/substrait/VeloxToSubstraitExpr.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpp/velox/substrait/VeloxToSubstraitExpr.cc 
b/cpp/velox/substrait/VeloxToSubstraitExpr.cc
index 66a2b4ff80..807c342cbd 100644
--- a/cpp/velox/substrait/VeloxToSubstraitExpr.cc
+++ b/cpp/velox/substrait/VeloxToSubstraitExpr.cc
@@ -141,7 +141,7 @@ const ::substrait::Expression_Literal& 
toSubstraitNotNullLiteral(
     }
     case velox::TypeKind::VARCHAR: {
       auto vCharValue = variantValue.value<StringView>();
-      ::substrait::Expression_Literal::VarChar* sVarChar = new 
::substrait::Expression_Literal::VarChar();
+      auto* sVarChar = 
google::protobuf::Arena::CreateMessage<::substrait::Expression_Literal::VarChar>(&arena);
       sVarChar->set_value(vCharValue.data());
       sVarChar->set_length(vCharValue.size());
       literalExpr->set_allocated_var_char(sVarChar);
@@ -261,7 +261,7 @@ const ::substrait::Expression_Literal& 
toSubstraitNotNullLiteral<TypeKind::VARCH
     const velox::StringView& value) {
   ::substrait::Expression_Literal* literalExpr =
       
google::protobuf::Arena::CreateMessage<::substrait::Expression_Literal>(&arena);
-  ::substrait::Expression_Literal::VarChar* sVarChar = new 
::substrait::Expression_Literal::VarChar();
+  auto* sVarChar = 
google::protobuf::Arena::CreateMessage<::substrait::Expression_Literal::VarChar>(&arena);
   sVarChar->set_value(value.data());
   sVarChar->set_length(value.size());
   literalExpr->set_allocated_var_char(sVarChar);


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

Reply via email to