wgtmac commented on code in PR #2317: URL: https://github.com/apache/orc/pull/2317#discussion_r2203684670
########## c++/src/RLE.cc: ########## @@ -77,9 +77,9 @@ namespace orc { add<int16_t>(data, numValues, notNull); } - NO_SANITIZE_ATTR void RleEncoder::writeVslong(int64_t val) { - writeVulong((val << 1) ^ (val >> 63)); + uint64_t uval = static_cast<uint64_t>(val); + writeVulong((uval << 1) ^ (static_cast<int64_t>(uval) >> 63)); Review Comment: Ah, I think I had a typo. I mean `writeVulong((uval << 1) ^ (val >> 63))`. Then we can simply write these two lines as `writeVulong((static_cast<uint64_t>(val) << 1) ^ (val >> 63));` -- 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-unsubscr...@orc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org