WillAyd opened a new issue, #314: URL: https://github.com/apache/arrow-nanoarrow/issues/314
As far as I can tell this is a valid construct for creating a DecimalArray ```c struct ArrowArray array; struct ArrowDecimal decimal1; struct ArrowDecimal decimal2; ArrowDecimalInit(&decimal1, 128, 10, 3); ArrowDecimalSetInt(&decimal1, 12345); ArrowDecimalInit(&decimal2, 128, 7, 6); ArrowDecimalSetInt(&decimal2, -67890); ArrowArrayInitFromType(&array, NANOARROW_TYPE_DECIMAL256); ArrowArrayStartAppending(&array); ArrowArrayAppendDecimal(&array, &decimal1); ArrowArrayAppendDecimal(&array, &decimal2); ArrowArrayFinishBuildingDefault(&array, nullptr) ``` But once the array is created - how can I reliably extract back out the decimal? I am seeing this pattern in the tests: ```c ArrowDecimal decimal3; ArrowDecimalInit(&decimal3, 128, 10, 3); ArrowArrayViewGetDecimalUnsafe(&array_view, 0, &decimal3); ``` But I don't see a way to do that without having to specify the precision and scale up front. Is that even possible or is the idea that all elements in the array have the same precision / scale? -- 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]
