iajoiner commented on a change in pull request #9702: URL: https://github.com/apache/arrow/pull/9702#discussion_r758914561
########## File path: cpp/src/arrow/adapters/orc/adapter_options.h ########## @@ -0,0 +1,269 @@ +// 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. + +#pragma once + +#include <set> +#include <sstream> + +#include "arrow/io/interfaces.h" +#include "arrow/util/visibility.h" +#include "orc/OrcFile.hh" + +namespace liborc = orc; + +namespace arrow { + +namespace adapters { + +namespace orc { +// Components of ORC Writer Options + +struct WriterOptionsPrivate; + +enum CompressionKind { + CompressionKind_NONE = 0, + CompressionKind_ZLIB = 1, + CompressionKind_SNAPPY = 2, + CompressionKind_LZO = 3, + CompressionKind_LZ4 = 4, + CompressionKind_ZSTD = 5, + CompressionKind_MAX = INT32_MAX +}; + +enum CompressionStrategy { + CompressionStrategy_SPEED = 0, + CompressionStrategy_COMPRESSION +}; + +enum RleVersion { RleVersion_1 = 0, RleVersion_2 = 1 }; + +enum BloomFilterVersion { + // Include both the BLOOM_FILTER and BLOOM_FILTER_UTF8 streams to support + // both old and new readers. + ORIGINAL = 0, + // Only include the BLOOM_FILTER_UTF8 streams that consistently use UTF8. + // See ORC-101 + UTF8 = 1, + FUTURE = INT32_MAX +}; + +class ARROW_EXPORT FileVersion { + private: + uint32_t major_version; + uint32_t minor_version; + + public: + static const FileVersion& v_0_11(); + static const FileVersion& v_0_12(); + + FileVersion(uint32_t major, uint32_t minor) + : major_version(major), minor_version(minor) {} + + /** + * Get major version + */ + uint32_t major() const { return this->major_version; } + + /** + * Get minor version + */ + uint32_t minor() const { return this->minor_version; } + + bool operator==(const FileVersion& right) const { + return this->major_version == right.major() && this->minor_version == right.minor(); + } + + bool operator!=(const FileVersion& right) const { return !(*this == right); } + + std::string ToString() const; +}; + +/** + * Options for creating a Writer. + */ +class ARROW_EXPORT WriterOptions { Review comment: Sure! I guess `arrow::adapters::orc::WriteOptions` will be fine and already denote that we are working with ORC as opposed to some other format. In Python on the other hand we probably should name it `ORCWriteOptions` if we want to keep it as a class. -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org