You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/07/07 02:57:16 UTC

[GitHub] [arrow] shanhuuang commented on a change in pull request #10627: PARQUET-490: [C++][Parquet] Basic support for encoding DELTA_BINARY_PACKED

shanhuuang commented on a change in pull request #10627:
URL: https://github.com/apache/arrow/pull/10627#discussion_r665004266



##########
File path: cpp/src/arrow/util/bit_stream_utils.h
##########
@@ -263,8 +284,10 @@ inline void GetValue_(int num_bits, T* v, int max_bytes, const uint8_t* buffer,
 #pragma warning(disable : 4800 4805)
 #endif
     // Read bits of v that crossed into new buffered_values_
-    *v = *v | static_cast<T>(BitUtil::TrailingBits(*buffered_values, *bit_offset)
-                             << (num_bits - *bit_offset));
+    if (ARROW_PREDICT_TRUE(num_bits - *bit_offset < 64)) {

Review comment:
       To solve the runtime error in test job "AMD64 Ubuntu 20.04 C++ ASAN UBSAN":
   /arrow/cpp/src/arrow/util/bit_stream_utils.h:289:30: runtime error: shift exponent 64 is too large for 64-bit type 'uint64_t' (aka 'unsigned long')
   https://github.com/shanhuuang/arrow/runs/2986826720?check_suite_focus=true#logs
   I met it when I try to read a file with only 3 records.
   




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