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

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

commit a2047edbfff67d192f8aa1d69b83350c4b0c29b9
Author: Rui Mo <[email protected]>
AuthorDate: Thu May 29 21:52:17 2025 +0800

    try
---
 cpp/velox/substrait/SubstraitToVeloxPlan.cc | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/cpp/velox/substrait/SubstraitToVeloxPlan.cc 
b/cpp/velox/substrait/SubstraitToVeloxPlan.cc
index c6951fd8a9..06c5ecfe61 100644
--- a/cpp/velox/substrait/SubstraitToVeloxPlan.cc
+++ b/cpp/velox/substrait/SubstraitToVeloxPlan.cc
@@ -1305,21 +1305,26 @@ core::PlanNodePtr 
SubstraitToVeloxPlanConverter::toVeloxPlan(const ::substrait::
   // array type the requested type is set to nullptr.
   auto names = colNameList;
   std::vector<TypePtr> types;
-  for (const auto& type : veloxTypeList) {
+  for (auto type : veloxTypeList) {
     if (type->kind() == TypeKind::ARRAY) {
-      types.push_back(nullptr);
+      auto arrayType = std::dynamic_pointer_cast<const ArrayType>(type);
+      types.push_back(arrayType->elementType());
     } else {
       types.emplace_back(type);
     }
   }
-  auto dataColumns = ROW(std::move(names), std::move(types));
+  std::cout << "names size: " << names.size() << ", types size: " << 
types.size()
+            << ", veloxTypeList: " << veloxTypeList.size() << std::endl;
+  auto requestedType = ROW(std::move(names), std::move(types));
+  auto dataTypes = veloxTypeList;
+  auto dataColumns = ROW(std::move(names), std::move(dataTypes));
 
   // Velox requires Filter Pushdown must being enabled.
   bool filterPushdownEnabled = true;
   std::shared_ptr<connector::hive::HiveTableHandle> tableHandle;
   if (!readRel.has_filter()) {
     tableHandle = std::make_shared<connector::hive::HiveTableHandle>(
-        kHiveConnectorId, "hive_table", filterPushdownEnabled, 
common::SubfieldFilters{}, nullptr, dataColumns);
+        kHiveConnectorId, "hive_table", filterPushdownEnabled, 
common::SubfieldFilters{}, nullptr, requestedType);
   } else {
     common::SubfieldFilters subfieldFilters;
     auto remainingFilter = exprConverter_->toVeloxExpr(readRel.filter(), 
dataColumns);
@@ -1330,7 +1335,7 @@ core::PlanNodePtr 
SubstraitToVeloxPlanConverter::toVeloxPlan(const ::substrait::
         filterPushdownEnabled,
         std::move(subfieldFilters),
         remainingFilter,
-        dataColumns);
+        requestedType);
   }
 
   // Get assignments and out names.


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

Reply via email to