etseidl commented on code in PR #37940:
URL: https://github.com/apache/arrow/pull/37940#discussion_r1340536156


##########
cpp/src/parquet/encoding.cc:
##########
@@ -2183,15 +2185,21 @@ class DeltaBitPackEncoder : public EncoderImpl, virtual 
public TypedEncoder<DTyp
 
   void FlushBlock();
 
+ private:
+  constexpr T SafeSubtract(T a, T b) const {
+    constexpr WT mask = static_cast<WT>(static_cast<UT>(static_cast<T>(-1)));
+    return static_cast<T>((static_cast<WT>(a) - static_cast<WT>(b)) & mask);
+  }

Review Comment:
   Yes, that sounds like a better location. Thanks!



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

Reply via email to