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/30 20:08:01 UTC

[GitHub] [arrow] wjones127 commented on a diff in pull request #34632: GH-34536: [Parquet][C++] Overwrite default config for DeltaBitPackEncoder

wjones127 commented on code in PR #34632:
URL: https://github.com/apache/arrow/pull/34632#discussion_r1153737392


##########
cpp/src/parquet/encoding.cc:
##########
@@ -2107,9 +2107,12 @@ class DictByteArrayDecoderImpl : public DictDecoderImpl<ByteArrayType>,
 
 template <typename DType>
 class DeltaBitPackEncoder : public EncoderImpl, virtual public TypedEncoder<DType> {
+  static_assert(std::is_same_v<int32_t, typename DType::c_type> ||
+                std::is_same_v<int64_t, typename DType::c_type>);
   // Maximum possible header size
   static constexpr uint32_t kMaxPageHeaderWriterSize = 32;
-  static constexpr uint32_t kValuesPerBlock = 128;
+  static constexpr uint32_t kValuesPerBlock =
+      std::is_same_v<int32_t, typename DType::c_type> ? 128 : 256;
   static constexpr uint32_t kMiniBlocksPerBlock = 4;

Review Comment:
   Just to make sure I understand, is this where the 128 / 256 are coming from here?
   ```suggestion
     static constexpr uint32_t kMiniBlocksPerBlock = 4;
     static constexpr uint32_t kValuesPerBlock = kMiniBlocksPerBlock * sizeof(typename DType::c_type);
   ```



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