You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "felipecrv (via GitHub)" <gi...@apache.org> on 2023/02/18 15:19:30 UTC

[GitHub] [arrow] felipecrv commented on a diff in pull request #34246: GH-34241: [C++] Fix ExecSpanIterator to properly initialize empty dictionary arrays

felipecrv commented on code in PR #34246:
URL: https://github.com/apache/arrow/pull/34246#discussion_r1111049020


##########
cpp/src/arrow/array/data.cc:
##########
@@ -231,10 +231,17 @@ void FillZeroLengthArray(const DataType* type, ArraySpan* span) {
     span->buffers[i] = {};
   }
 
-  // Fill children
-  span->child_data.resize(type->num_fields());
-  for (int i = 0; i < type->num_fields(); ++i) {
-    FillZeroLengthArray(type->field(i)->type().get(), &span->child_data[i]);
+  if (type->id() == Type::DICTIONARY) {
+    span->child_data.resize(1);
+    const std::shared_ptr<DataType>& values_type =

Review Comment:
   nitpick: `value_type`



-- 
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-unsubscribe@arrow.apache.org

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