emkornfield commented on code in PR #48345: URL: https://github.com/apache/arrow/pull/48345#discussion_r3353522469
########## cpp/src/arrow/util/alp/alp_constants.h: ########## @@ -0,0 +1,280 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Constants and type traits for ALP (Adaptive Lossless floating-Point) compression. +// Spec: https://github.com/apache/parquet-format/blob/master/Encodings.md#alp + +#pragma once + +#include <cstdint> + +#include "arrow/util/logging.h" + +namespace arrow { +namespace util { +namespace alp { + +// ---------------------------------------------------------------------- +// AlpConstants + +/// \brief Constants for Adaptive Lossless floating-Point (ALP) compression +/// See: https://github.com/apache/parquet-format/blob/master/Encodings.md#alp +class AlpConstants { + public: + /// Number of elements compressed together as a unit. + /// The format supports arbitrary power-of-2 sizes via log_vector_size in the + /// page header, but this implementation currently only supports 1024. + /// Must fit in uint16_t (max 65535), so log_vector_size must be <= 15. + static constexpr int64_t kAlpVectorSize = 1024; Review Comment: I thought you said C++ now supports arbitrary sizes? -- 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]
