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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]