NinaPeng commented on a change in pull request #9060:
URL: https://github.com/apache/arrow/pull/9060#discussion_r604632644



##########
File path: cpp/src/gandiva/projector.cc
##########
@@ -301,7 +348,24 @@ Status Projector::AllocArrayData(const DataTypePtr& type, 
int64_t num_records,
   }
   buffers.push_back(std::move(data_buffer));
 
-  *array_data = arrow::ArrayData::Make(type, num_records, std::move(buffers));
+  if (type->id() == arrow::Type::LIST) {
+    auto internal_type = type->field(0)->type();
+    ArrayDataPtr child_data;
+    if (arrow::is_primitive(internal_type->id())) {
+      child_data = arrow::ArrayData::Make(internal_type, 0 /*initialize 
length*/,
+                                          {nullptr, std::move(buffers[2])}, 0);

Review comment:
       At the begining, I just want to support some simple list type 
computation. So I make an assumption without validity information. I also 
ignored child validity in field descriptor. 
   
   Will think about child validity addtionally.




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to