bkietz commented on a change in pull request #7378:
URL: https://github.com/apache/arrow/pull/7378#discussion_r436930007
##########
File path: cpp/src/arrow/c/bridge.cc
##########
@@ -1320,14 +1324,16 @@ struct ArrayImporter {
Status Visit(const UnionType& type) {
auto mode = type.mode();
- RETURN_NOT_OK(CheckNumBuffers(3));
+ if (mode == UnionMode::SPARSE) {
+ RETURN_NOT_OK(CheckNumBuffers(2));
+ } else {
+ RETURN_NOT_OK(CheckNumBuffers(3));
+ }
Review comment:
@pitrou
##########
File path: cpp/src/arrow/c/bridge.cc
##########
@@ -1320,14 +1324,16 @@ struct ArrayImporter {
Status Visit(const UnionType& type) {
auto mode = type.mode();
- RETURN_NOT_OK(CheckNumBuffers(3));
+ if (mode == UnionMode::SPARSE) {
+ RETURN_NOT_OK(CheckNumBuffers(2));
+ } else {
+ RETURN_NOT_OK(CheckNumBuffers(3));
+ }
Review comment:
I did not change the IPC format, which has always stored just two
buffers in the sparse case. See
https://github.com/apache/arrow/pull/7378/files#diff-78fdd845f659c6d03d17716eb6e27cebR316
----------------------------------------------------------------
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]