pitrou commented on code in PR #41814:
URL: https://github.com/apache/arrow/pull/41814#discussion_r1617543309
##########
cpp/src/arrow/array/data.cc:
##########
@@ -233,28 +233,40 @@ DeviceAllocationType ArrayData::device_type() const {
int type = 0;
for (const auto& buf : buffers) {
if (!buf) continue;
+#ifdef NDEBUG
+ return buf->device_type();
+#else
if (type == 0) {
type = static_cast<int>(buf->device_type());
} else {
DCHECK_EQ(type, static_cast<int>(buf->device_type()));
}
+#endif
}
for (const auto& child : child_data) {
if (!child) continue;
Review Comment:
Note that, unlike buffers, this should not happen.
--
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]