You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Hattonuri (via GitHub)" <gi...@apache.org> on 2023/11/26 17:41:40 UTC

[I] [C++] Decimal FromBigEndian start to use ByteSwap [arrow]

Hattonuri opened a new issue, #38886:
URL: https://github.com/apache/arrow/issues/38886

   ### Describe the enhancement requested
   
   When arrow parses decimal from big endian (and it happens on every element read from parquet for example), it does this in a very complex way
   https://github.com/apache/arrow/blob/eb5de184a7e5d02f98526332ace54250417bd232/cpp/src/arrow/util/decimal.cc#L745-L796
   I assume that it's because FromBigEndian function uses ByteSwap which lacks fast version(those are in switch case)
   https://github.com/apache/arrow/blob/eb5de184a7e5d02f98526332ace54250417bd232/cpp/src/arrow/util/endian.h#L96-L119
   
   But ByteSwap on 16 byte length can be written using two ByteSwaps of 8 length as here https://stackoverflow.com/questions/8004790/how-to-change-byte-order-of-128-bit-number
   
   ### Component(s)
   
   C++


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

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


Re: [I] [C++] Decimal FromBigEndian start to use ByteSwap [arrow]

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

   I understood that when the length of FLBA and decimal are equal almost the same 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: github-unsubscribe@arrow.apache.org

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


Re: [I] [C++] Decimal FromBigEndian start to use ByteSwap [arrow]

Posted by "Hattonuri (via GitHub)" <gi...@apache.org>.
Hattonuri closed issue #38886: [C++] Decimal FromBigEndian start to use ByteSwap
URL: https://github.com/apache/arrow/issues/38886


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

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


Re: [I] [C++] Decimal FromBigEndian start to use ByteSwap [arrow]

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

   This issue probably connected with previous issue about too slow RawBytesToDecimalBytes https://github.com/apache/arrow/issues/38881


-- 
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