You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "wjones127 (via GitHub)" <gi...@apache.org> on 2023/03/27 19:10:27 UTC

[GitHub] [arrow-nanoarrow] wjones127 opened a new issue, #170: Decimal creation utilities

wjones127 opened a new issue, #170:
URL: https://github.com/apache/arrow-nanoarrow/issues/170

   Arrow specifies a particular format for decimals to be laid out, it would be nice to have a struct like Arrow's Decimal128/Decimal256 that allows us to construct them from integers and have a method `ArrowArrayAppendDecimal`.
   


-- 
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: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-nanoarrow] paleolimbot closed issue #170: Decimal creation utilities

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot closed issue #170: Decimal creation utilities
URL: https://github.com/apache/arrow-nanoarrow/issues/170


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-nanoarrow] paleolimbot commented on issue #170: Decimal creation utilities

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on issue #170:
URL: https://github.com/apache/arrow-nanoarrow/issues/170#issuecomment-1486924351

   Thanks for bringing this up - I think it's definitely in scope to add a decimal extractor and appender. We'd probably need a struct to define a decimal...maybe:
   
   ```c
   struct ArrowDecimal {
     // Words defined from most-significant to least-significant or the other way around?
     // nanoarrow could take care of ensuring that these are copied in the right order on big endian
     int32_t words[8]; // or int64_t words[4]?
     int32_t precision;
     int32_t scale;
   };
   
   ArrowErrorCode ArrowArrayAppendDecimal(struct ArrowArray* array, struct ArrowDecimal* value);
   void ArrowArrayViewGetDecimal(struct ArrowArrayView* array_view, struct ArrowDecimal* out);
   ```
   
   Do we need creation to/from `double`?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org