You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "pitrou (via GitHub)" <gi...@apache.org> on 2026/09/01 09:39:29 UTC

Re: [PR] GH-50993: [CI][Integration] Add extension-wrapped union to integration data [arrow]

pitrou commented on code in PR #51027:
URL: https://github.com/apache/arrow/pull/51027#discussion_r3902812862


##########
cpp/src/arrow/c/bridge.cc:
##########
@@ -579,16 +579,23 @@ struct ArrayExporter {
     // This is because ARROW-9037 is in version 0.17 and 0.17.1, and they are
     // not able to import arrays without a null bitmap and null_count == -1.
     data->GetNullCount();
+
+    const DataType* physical_type = data->type.get();
+    if (physical_type->id() == Type::EXTENSION) {
+      physical_type =
+          checked_cast<const ExtensionType&>(*physical_type).storage_type().get();
+    }
+

Review Comment:
   I'm just noticing that we can simply call `DataType::storage_id` here:
   ```c++
     const auto physical_type_id = data->type->storage_id();
   ```
   and then:
   ```c+++
     if (n_buffers > 0 && !internal::may_have_validity_bitmap(physical_type_id)) {
   ```



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