cocoa-xu commented on code in PR #507:
URL: https://github.com/apache/arrow-nanoarrow/pull/507#discussion_r1627810944
##########
src/nanoarrow/array.c:
##########
@@ -846,6 +856,75 @@ static int ArrowArrayViewValidateMinimal(struct
ArrowArrayView* array_view,
return EINVAL;
}
break;
+
+ case NANOARROW_TYPE_RUN_END_ENCODED:
+ if (array_view->n_children != 2) {
+ ArrowErrorSet(error,
+ "Expected 2 children for run-end encoded array but found
%ld",
+ (long)array_view->n_children);
+ return EINVAL;
+ }
+ struct ArrowArrayView* run_ends_view;
+ struct ArrowArrayView* values_view;
+ run_ends_view = array_view->children[0];
+ values_view = array_view->children[1];
Review Comment:
Sadly we cannot do this because it will cause compile errors...
https://github.com/apache/arrow-nanoarrow/actions/runs/9382594421/job/25834344055
```
[ 3%] Building CXX object
CMakeFiles/nanoarrow.dir/amalgamation/nanoarrow/nanoarrow.cc.o
/home/runner/work/arrow-nanoarrow/arrow-nanoarrow/build/amalgamation/nanoarrow/nanoarrow.cc:
In function ‘int ArrowArrayViewValidateMinimal(ArrowArrayView*, ArrowError*)’:
/home/runner/work/arrow-nanoarrow/arrow-nanoarrow/build/amalgamation/nanoarrow/nanoarrow.cc:3022:5:
error: jump to case label
3022 | default:
| ^~~~~~~
/home/runner/work/arrow-nanoarrow/arrow-nanoarrow/build/amalgamation/nanoarrow/nanoarrow.cc:2973:16:
note: crosses initialization of ‘uint64_t max_length’
2973 | uint64_t max_length = 0;
| ^~~~~~~~~~
/home/runner/work/arrow-nanoarrow/arrow-nanoarrow/build/amalgamation/nanoarrow/nanoarrow.cc:2964:30:
note: crosses initialization of ‘ArrowArrayView* values_view’
2964 | struct ArrowArrayView* values_view = array_view->children[1];
| ^~~~~~~~~~~
/home/runner/work/arrow-nanoarrow/arrow-nanoarrow/build/amalgamation/nanoarrow/nanoarrow.cc:2963:30:
note: crosses initialization of ‘ArrowArrayView* run_ends_view’
2963 | struct ArrowArrayView* run_ends_view = array_view->children[0];
| ^~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/nanoarrow.dir/build.make:76:
CMakeFiles/nanoarrow.dir/amalgamation/nanoarrow/nanoarrow.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:230: CMakeFiles/nanoarrow.dir/all] Error
2
gmake: *** [Makefile:146: all] Error 2
```
--
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]