Skip to main content

orc_rust/
proto.rs

1// Licensed to the Apache Software Foundation (ASF) under one
2// or more contributor license agreements.  See the NOTICE file
3// distributed with this work for additional information
4// regarding copyright ownership.  The ASF licenses this file
5// to you under the Apache License, Version 2.0 (the
6// "License"); you may not use this file except in compliance
7// with the License.  You may obtain a copy of the License at
8//
9//   http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing,
12// software distributed under the License is distributed on an
13// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14// KIND, either express or implied.  See the License for the
15// specific language governing permissions and limitations
16// under the License.
17
18// This file was automatically generated through the regen.sh script, and should not be edited.
19
20#[allow(clippy::derive_partial_eq_without_eq)]
21#[derive(Clone, PartialEq, ::prost::Message)]
22pub struct IntegerStatistics {
23    #[prost(sint64, optional, tag = "1")]
24    pub minimum: ::core::option::Option<i64>,
25    #[prost(sint64, optional, tag = "2")]
26    pub maximum: ::core::option::Option<i64>,
27    #[prost(sint64, optional, tag = "3")]
28    pub sum: ::core::option::Option<i64>,
29}
30#[allow(clippy::derive_partial_eq_without_eq)]
31#[derive(Clone, PartialEq, ::prost::Message)]
32pub struct DoubleStatistics {
33    #[prost(double, optional, tag = "1")]
34    pub minimum: ::core::option::Option<f64>,
35    #[prost(double, optional, tag = "2")]
36    pub maximum: ::core::option::Option<f64>,
37    #[prost(double, optional, tag = "3")]
38    pub sum: ::core::option::Option<f64>,
39}
40#[allow(clippy::derive_partial_eq_without_eq)]
41#[derive(Clone, PartialEq, ::prost::Message)]
42pub struct StringStatistics {
43    #[prost(string, optional, tag = "1")]
44    pub minimum: ::core::option::Option<::prost::alloc::string::String>,
45    #[prost(string, optional, tag = "2")]
46    pub maximum: ::core::option::Option<::prost::alloc::string::String>,
47    /// sum will store the total length of all strings in a stripe
48    #[prost(sint64, optional, tag = "3")]
49    pub sum: ::core::option::Option<i64>,
50    /// If the minimum or maximum value was longer than 1024 bytes, store a lower or upper
51    /// bound instead of the minimum or maximum values above.
52    #[prost(string, optional, tag = "4")]
53    pub lower_bound: ::core::option::Option<::prost::alloc::string::String>,
54    #[prost(string, optional, tag = "5")]
55    pub upper_bound: ::core::option::Option<::prost::alloc::string::String>,
56}
57#[allow(clippy::derive_partial_eq_without_eq)]
58#[derive(Clone, PartialEq, ::prost::Message)]
59pub struct BucketStatistics {
60    #[prost(uint64, repeated, tag = "1")]
61    pub count: ::prost::alloc::vec::Vec<u64>,
62}
63#[allow(clippy::derive_partial_eq_without_eq)]
64#[derive(Clone, PartialEq, ::prost::Message)]
65pub struct DecimalStatistics {
66    #[prost(string, optional, tag = "1")]
67    pub minimum: ::core::option::Option<::prost::alloc::string::String>,
68    #[prost(string, optional, tag = "2")]
69    pub maximum: ::core::option::Option<::prost::alloc::string::String>,
70    #[prost(string, optional, tag = "3")]
71    pub sum: ::core::option::Option<::prost::alloc::string::String>,
72}
73#[allow(clippy::derive_partial_eq_without_eq)]
74#[derive(Clone, PartialEq, ::prost::Message)]
75pub struct DateStatistics {
76    /// min,max values saved as days since epoch
77    #[prost(sint32, optional, tag = "1")]
78    pub minimum: ::core::option::Option<i32>,
79    #[prost(sint32, optional, tag = "2")]
80    pub maximum: ::core::option::Option<i32>,
81}
82#[allow(clippy::derive_partial_eq_without_eq)]
83#[derive(Clone, PartialEq, ::prost::Message)]
84pub struct TimestampStatistics {
85    /// min,max values saved as milliseconds since epoch
86    #[prost(sint64, optional, tag = "1")]
87    pub minimum: ::core::option::Option<i64>,
88    #[prost(sint64, optional, tag = "2")]
89    pub maximum: ::core::option::Option<i64>,
90    #[prost(sint64, optional, tag = "3")]
91    pub minimum_utc: ::core::option::Option<i64>,
92    #[prost(sint64, optional, tag = "4")]
93    pub maximum_utc: ::core::option::Option<i64>,
94    /// store the lower 6 TS digits for min/max to achieve nanosecond precision
95    #[prost(int32, optional, tag = "5")]
96    pub minimum_nanos: ::core::option::Option<i32>,
97    #[prost(int32, optional, tag = "6")]
98    pub maximum_nanos: ::core::option::Option<i32>,
99}
100#[allow(clippy::derive_partial_eq_without_eq)]
101#[derive(Clone, PartialEq, ::prost::Message)]
102pub struct BinaryStatistics {
103    /// sum will store the total binary blob length in a stripe
104    #[prost(sint64, optional, tag = "1")]
105    pub sum: ::core::option::Option<i64>,
106}
107/// Statistics for list and map
108#[allow(clippy::derive_partial_eq_without_eq)]
109#[derive(Clone, PartialEq, ::prost::Message)]
110pub struct CollectionStatistics {
111    #[prost(uint64, optional, tag = "1")]
112    pub min_children: ::core::option::Option<u64>,
113    #[prost(uint64, optional, tag = "2")]
114    pub max_children: ::core::option::Option<u64>,
115    #[prost(uint64, optional, tag = "3")]
116    pub total_children: ::core::option::Option<u64>,
117}
118#[allow(clippy::derive_partial_eq_without_eq)]
119#[derive(Clone, PartialEq, ::prost::Message)]
120pub struct ColumnStatistics {
121    #[prost(uint64, optional, tag = "1")]
122    pub number_of_values: ::core::option::Option<u64>,
123    #[prost(message, optional, tag = "2")]
124    pub int_statistics: ::core::option::Option<IntegerStatistics>,
125    #[prost(message, optional, tag = "3")]
126    pub double_statistics: ::core::option::Option<DoubleStatistics>,
127    #[prost(message, optional, tag = "4")]
128    pub string_statistics: ::core::option::Option<StringStatistics>,
129    #[prost(message, optional, tag = "5")]
130    pub bucket_statistics: ::core::option::Option<BucketStatistics>,
131    #[prost(message, optional, tag = "6")]
132    pub decimal_statistics: ::core::option::Option<DecimalStatistics>,
133    #[prost(message, optional, tag = "7")]
134    pub date_statistics: ::core::option::Option<DateStatistics>,
135    #[prost(message, optional, tag = "8")]
136    pub binary_statistics: ::core::option::Option<BinaryStatistics>,
137    #[prost(message, optional, tag = "9")]
138    pub timestamp_statistics: ::core::option::Option<TimestampStatistics>,
139    #[prost(bool, optional, tag = "10")]
140    pub has_null: ::core::option::Option<bool>,
141    #[prost(uint64, optional, tag = "11")]
142    pub bytes_on_disk: ::core::option::Option<u64>,
143    #[prost(message, optional, tag = "12")]
144    pub collection_statistics: ::core::option::Option<CollectionStatistics>,
145}
146#[allow(clippy::derive_partial_eq_without_eq)]
147#[derive(Clone, PartialEq, ::prost::Message)]
148pub struct RowIndexEntry {
149    #[prost(uint64, repeated, tag = "1")]
150    pub positions: ::prost::alloc::vec::Vec<u64>,
151    #[prost(message, optional, tag = "2")]
152    pub statistics: ::core::option::Option<ColumnStatistics>,
153}
154#[allow(clippy::derive_partial_eq_without_eq)]
155#[derive(Clone, PartialEq, ::prost::Message)]
156pub struct RowIndex {
157    #[prost(message, repeated, tag = "1")]
158    pub entry: ::prost::alloc::vec::Vec<RowIndexEntry>,
159}
160#[allow(clippy::derive_partial_eq_without_eq)]
161#[derive(Clone, PartialEq, ::prost::Message)]
162pub struct BloomFilter {
163    #[prost(uint32, optional, tag = "1")]
164    pub num_hash_functions: ::core::option::Option<u32>,
165    #[prost(fixed64, repeated, packed = "false", tag = "2")]
166    pub bitset: ::prost::alloc::vec::Vec<u64>,
167    #[prost(bytes = "vec", optional, tag = "3")]
168    pub utf8bitset: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
169}
170#[allow(clippy::derive_partial_eq_without_eq)]
171#[derive(Clone, PartialEq, ::prost::Message)]
172pub struct BloomFilterIndex {
173    #[prost(message, repeated, tag = "1")]
174    pub bloom_filter: ::prost::alloc::vec::Vec<BloomFilter>,
175}
176#[allow(clippy::derive_partial_eq_without_eq)]
177#[derive(Clone, PartialEq, ::prost::Message)]
178pub struct Stream {
179    #[prost(enumeration = "stream::Kind", optional, tag = "1")]
180    pub kind: ::core::option::Option<i32>,
181    #[prost(uint32, optional, tag = "2")]
182    pub column: ::core::option::Option<u32>,
183    #[prost(uint64, optional, tag = "3")]
184    pub length: ::core::option::Option<u64>,
185}
186/// Nested message and enum types in `Stream`.
187pub mod stream {
188    /// if you add new index stream kinds, you need to make sure to update
189    /// StreamName to ensure it is added to the stripe in the right area
190    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
191    #[repr(i32)]
192    pub enum Kind {
193        Present = 0,
194        Data = 1,
195        Length = 2,
196        DictionaryData = 3,
197        DictionaryCount = 4,
198        Secondary = 5,
199        RowIndex = 6,
200        BloomFilter = 7,
201        BloomFilterUtf8 = 8,
202        /// Virtual stream kinds to allocate space for encrypted index and data.
203        EncryptedIndex = 9,
204        EncryptedData = 10,
205        /// stripe statistics streams
206        StripeStatistics = 100,
207        /// A virtual stream kind that is used for setting the encryption IV.
208        FileStatistics = 101,
209    }
210    impl Kind {
211        /// String value of the enum field names used in the ProtoBuf definition.
212        ///
213        /// The values are not transformed in any way and thus are considered stable
214        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
215        pub fn as_str_name(&self) -> &'static str {
216            match self {
217                Kind::Present => "PRESENT",
218                Kind::Data => "DATA",
219                Kind::Length => "LENGTH",
220                Kind::DictionaryData => "DICTIONARY_DATA",
221                Kind::DictionaryCount => "DICTIONARY_COUNT",
222                Kind::Secondary => "SECONDARY",
223                Kind::RowIndex => "ROW_INDEX",
224                Kind::BloomFilter => "BLOOM_FILTER",
225                Kind::BloomFilterUtf8 => "BLOOM_FILTER_UTF8",
226                Kind::EncryptedIndex => "ENCRYPTED_INDEX",
227                Kind::EncryptedData => "ENCRYPTED_DATA",
228                Kind::StripeStatistics => "STRIPE_STATISTICS",
229                Kind::FileStatistics => "FILE_STATISTICS",
230            }
231        }
232        /// Creates an enum from field names used in the ProtoBuf definition.
233        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
234            match value {
235                "PRESENT" => Some(Self::Present),
236                "DATA" => Some(Self::Data),
237                "LENGTH" => Some(Self::Length),
238                "DICTIONARY_DATA" => Some(Self::DictionaryData),
239                "DICTIONARY_COUNT" => Some(Self::DictionaryCount),
240                "SECONDARY" => Some(Self::Secondary),
241                "ROW_INDEX" => Some(Self::RowIndex),
242                "BLOOM_FILTER" => Some(Self::BloomFilter),
243                "BLOOM_FILTER_UTF8" => Some(Self::BloomFilterUtf8),
244                "ENCRYPTED_INDEX" => Some(Self::EncryptedIndex),
245                "ENCRYPTED_DATA" => Some(Self::EncryptedData),
246                "STRIPE_STATISTICS" => Some(Self::StripeStatistics),
247                "FILE_STATISTICS" => Some(Self::FileStatistics),
248                _ => None,
249            }
250        }
251    }
252}
253#[allow(clippy::derive_partial_eq_without_eq)]
254#[derive(Clone, PartialEq, ::prost::Message)]
255pub struct ColumnEncoding {
256    #[prost(enumeration = "column_encoding::Kind", optional, tag = "1")]
257    pub kind: ::core::option::Option<i32>,
258    #[prost(uint32, optional, tag = "2")]
259    pub dictionary_size: ::core::option::Option<u32>,
260    /// The encoding of the bloom filters for this column:
261    ///    0 or missing = none or original
262    ///    1            = ORC-135 (utc for timestamps)
263    #[prost(uint32, optional, tag = "3")]
264    pub bloom_encoding: ::core::option::Option<u32>,
265}
266/// Nested message and enum types in `ColumnEncoding`.
267pub mod column_encoding {
268    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
269    #[repr(i32)]
270    pub enum Kind {
271        Direct = 0,
272        Dictionary = 1,
273        DirectV2 = 2,
274        DictionaryV2 = 3,
275    }
276    impl Kind {
277        /// String value of the enum field names used in the ProtoBuf definition.
278        ///
279        /// The values are not transformed in any way and thus are considered stable
280        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
281        pub fn as_str_name(&self) -> &'static str {
282            match self {
283                Kind::Direct => "DIRECT",
284                Kind::Dictionary => "DICTIONARY",
285                Kind::DirectV2 => "DIRECT_V2",
286                Kind::DictionaryV2 => "DICTIONARY_V2",
287            }
288        }
289        /// Creates an enum from field names used in the ProtoBuf definition.
290        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
291            match value {
292                "DIRECT" => Some(Self::Direct),
293                "DICTIONARY" => Some(Self::Dictionary),
294                "DIRECT_V2" => Some(Self::DirectV2),
295                "DICTIONARY_V2" => Some(Self::DictionaryV2),
296                _ => None,
297            }
298        }
299    }
300}
301#[allow(clippy::derive_partial_eq_without_eq)]
302#[derive(Clone, PartialEq, ::prost::Message)]
303pub struct StripeEncryptionVariant {
304    #[prost(message, repeated, tag = "1")]
305    pub streams: ::prost::alloc::vec::Vec<Stream>,
306    #[prost(message, repeated, tag = "2")]
307    pub encoding: ::prost::alloc::vec::Vec<ColumnEncoding>,
308}
309// each stripe looks like:
310//    index streams
311//      unencrypted
312//      variant 1..N
313//    data streams
314//      unencrypted
315//      variant 1..N
316//    footer
317
318#[allow(clippy::derive_partial_eq_without_eq)]
319#[derive(Clone, PartialEq, ::prost::Message)]
320pub struct StripeFooter {
321    #[prost(message, repeated, tag = "1")]
322    pub streams: ::prost::alloc::vec::Vec<Stream>,
323    #[prost(message, repeated, tag = "2")]
324    pub columns: ::prost::alloc::vec::Vec<ColumnEncoding>,
325    #[prost(string, optional, tag = "3")]
326    pub writer_timezone: ::core::option::Option<::prost::alloc::string::String>,
327    /// one for each column encryption variant
328    #[prost(message, repeated, tag = "4")]
329    pub encryption: ::prost::alloc::vec::Vec<StripeEncryptionVariant>,
330}
331// the file tail looks like:
332//    encrypted stripe statistics: ColumnarStripeStatistics (order by variant)
333//    stripe statistics: Metadata
334//    footer: Footer
335//    postscript: PostScript
336//    psLen: byte
337
338#[allow(clippy::derive_partial_eq_without_eq)]
339#[derive(Clone, PartialEq, ::prost::Message)]
340pub struct StringPair {
341    #[prost(string, optional, tag = "1")]
342    pub key: ::core::option::Option<::prost::alloc::string::String>,
343    #[prost(string, optional, tag = "2")]
344    pub value: ::core::option::Option<::prost::alloc::string::String>,
345}
346#[allow(clippy::derive_partial_eq_without_eq)]
347#[derive(Clone, PartialEq, ::prost::Message)]
348pub struct Type {
349    #[prost(enumeration = "r#type::Kind", optional, tag = "1")]
350    pub kind: ::core::option::Option<i32>,
351    #[prost(uint32, repeated, tag = "2")]
352    pub subtypes: ::prost::alloc::vec::Vec<u32>,
353    #[prost(string, repeated, tag = "3")]
354    pub field_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
355    #[prost(uint32, optional, tag = "4")]
356    pub maximum_length: ::core::option::Option<u32>,
357    #[prost(uint32, optional, tag = "5")]
358    pub precision: ::core::option::Option<u32>,
359    #[prost(uint32, optional, tag = "6")]
360    pub scale: ::core::option::Option<u32>,
361    #[prost(message, repeated, tag = "7")]
362    pub attributes: ::prost::alloc::vec::Vec<StringPair>,
363}
364/// Nested message and enum types in `Type`.
365pub mod r#type {
366    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
367    #[repr(i32)]
368    pub enum Kind {
369        Boolean = 0,
370        Byte = 1,
371        Short = 2,
372        Int = 3,
373        Long = 4,
374        Float = 5,
375        Double = 6,
376        String = 7,
377        Binary = 8,
378        Timestamp = 9,
379        List = 10,
380        Map = 11,
381        Struct = 12,
382        Union = 13,
383        Decimal = 14,
384        Date = 15,
385        Varchar = 16,
386        Char = 17,
387        TimestampInstant = 18,
388    }
389    impl Kind {
390        /// String value of the enum field names used in the ProtoBuf definition.
391        ///
392        /// The values are not transformed in any way and thus are considered stable
393        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
394        pub fn as_str_name(&self) -> &'static str {
395            match self {
396                Kind::Boolean => "BOOLEAN",
397                Kind::Byte => "BYTE",
398                Kind::Short => "SHORT",
399                Kind::Int => "INT",
400                Kind::Long => "LONG",
401                Kind::Float => "FLOAT",
402                Kind::Double => "DOUBLE",
403                Kind::String => "STRING",
404                Kind::Binary => "BINARY",
405                Kind::Timestamp => "TIMESTAMP",
406                Kind::List => "LIST",
407                Kind::Map => "MAP",
408                Kind::Struct => "STRUCT",
409                Kind::Union => "UNION",
410                Kind::Decimal => "DECIMAL",
411                Kind::Date => "DATE",
412                Kind::Varchar => "VARCHAR",
413                Kind::Char => "CHAR",
414                Kind::TimestampInstant => "TIMESTAMP_INSTANT",
415            }
416        }
417        /// Creates an enum from field names used in the ProtoBuf definition.
418        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
419            match value {
420                "BOOLEAN" => Some(Self::Boolean),
421                "BYTE" => Some(Self::Byte),
422                "SHORT" => Some(Self::Short),
423                "INT" => Some(Self::Int),
424                "LONG" => Some(Self::Long),
425                "FLOAT" => Some(Self::Float),
426                "DOUBLE" => Some(Self::Double),
427                "STRING" => Some(Self::String),
428                "BINARY" => Some(Self::Binary),
429                "TIMESTAMP" => Some(Self::Timestamp),
430                "LIST" => Some(Self::List),
431                "MAP" => Some(Self::Map),
432                "STRUCT" => Some(Self::Struct),
433                "UNION" => Some(Self::Union),
434                "DECIMAL" => Some(Self::Decimal),
435                "DATE" => Some(Self::Date),
436                "VARCHAR" => Some(Self::Varchar),
437                "CHAR" => Some(Self::Char),
438                "TIMESTAMP_INSTANT" => Some(Self::TimestampInstant),
439                _ => None,
440            }
441        }
442    }
443}
444#[allow(clippy::derive_partial_eq_without_eq)]
445#[derive(Clone, PartialEq, ::prost::Message)]
446pub struct StripeInformation {
447    /// the global file offset of the start of the stripe
448    #[prost(uint64, optional, tag = "1")]
449    pub offset: ::core::option::Option<u64>,
450    /// the number of bytes of index
451    #[prost(uint64, optional, tag = "2")]
452    pub index_length: ::core::option::Option<u64>,
453    /// the number of bytes of data
454    #[prost(uint64, optional, tag = "3")]
455    pub data_length: ::core::option::Option<u64>,
456    /// the number of bytes in the stripe footer
457    #[prost(uint64, optional, tag = "4")]
458    pub footer_length: ::core::option::Option<u64>,
459    /// the number of rows in this stripe
460    #[prost(uint64, optional, tag = "5")]
461    pub number_of_rows: ::core::option::Option<u64>,
462    /// If this is present, the reader should use this value for the encryption
463    /// stripe id for setting the encryption IV. Otherwise, the reader should
464    /// use one larger than the previous stripe's encryptStripeId.
465    /// For unmerged ORC files, the first stripe will use 1 and the rest of the
466    /// stripes won't have it set. For merged files, the stripe information
467    /// will be copied from their original files and thus the first stripe of
468    /// each of the input files will reset it to 1.
469    /// Note that 1 was choosen, because protobuf v3 doesn't serialize
470    /// primitive types that are the default (eg. 0).
471    #[prost(uint64, optional, tag = "6")]
472    pub encrypt_stripe_id: ::core::option::Option<u64>,
473    /// For each encryption variant, the new encrypted local key to use
474    /// until we find a replacement.
475    #[prost(bytes = "vec", repeated, tag = "7")]
476    pub encrypted_local_keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
477}
478#[allow(clippy::derive_partial_eq_without_eq)]
479#[derive(Clone, PartialEq, ::prost::Message)]
480pub struct UserMetadataItem {
481    #[prost(string, optional, tag = "1")]
482    pub name: ::core::option::Option<::prost::alloc::string::String>,
483    #[prost(bytes = "vec", optional, tag = "2")]
484    pub value: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
485}
486/// StripeStatistics (1 per a stripe), which each contain the
487/// ColumnStatistics for each column.
488/// This message type is only used in ORC v0 and v1.
489#[allow(clippy::derive_partial_eq_without_eq)]
490#[derive(Clone, PartialEq, ::prost::Message)]
491pub struct StripeStatistics {
492    #[prost(message, repeated, tag = "1")]
493    pub col_stats: ::prost::alloc::vec::Vec<ColumnStatistics>,
494}
495/// This message type is only used in ORC v0 and v1.
496#[allow(clippy::derive_partial_eq_without_eq)]
497#[derive(Clone, PartialEq, ::prost::Message)]
498pub struct Metadata {
499    #[prost(message, repeated, tag = "1")]
500    pub stripe_stats: ::prost::alloc::vec::Vec<StripeStatistics>,
501}
502/// In ORC v2 (and for encrypted columns in v1), each column has
503/// their column statistics written separately.
504#[allow(clippy::derive_partial_eq_without_eq)]
505#[derive(Clone, PartialEq, ::prost::Message)]
506pub struct ColumnarStripeStatistics {
507    /// one value for each stripe in the file
508    #[prost(message, repeated, tag = "1")]
509    pub col_stats: ::prost::alloc::vec::Vec<ColumnStatistics>,
510}
511#[allow(clippy::derive_partial_eq_without_eq)]
512#[derive(Clone, PartialEq, ::prost::Message)]
513pub struct FileStatistics {
514    #[prost(message, repeated, tag = "1")]
515    pub column: ::prost::alloc::vec::Vec<ColumnStatistics>,
516}
517/// How was the data masked? This isn't necessary for reading the file, but
518/// is documentation about how the file was written.
519#[allow(clippy::derive_partial_eq_without_eq)]
520#[derive(Clone, PartialEq, ::prost::Message)]
521pub struct DataMask {
522    /// the kind of masking, which may include third party masks
523    #[prost(string, optional, tag = "1")]
524    pub name: ::core::option::Option<::prost::alloc::string::String>,
525    /// parameters for the mask
526    #[prost(string, repeated, tag = "2")]
527    pub mask_parameters: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
528    /// the unencrypted column roots this mask was applied to
529    #[prost(uint32, repeated, tag = "3")]
530    pub columns: ::prost::alloc::vec::Vec<u32>,
531}
532/// Information about the encryption keys.
533#[allow(clippy::derive_partial_eq_without_eq)]
534#[derive(Clone, PartialEq, ::prost::Message)]
535pub struct EncryptionKey {
536    #[prost(string, optional, tag = "1")]
537    pub key_name: ::core::option::Option<::prost::alloc::string::String>,
538    #[prost(uint32, optional, tag = "2")]
539    pub key_version: ::core::option::Option<u32>,
540    #[prost(enumeration = "EncryptionAlgorithm", optional, tag = "3")]
541    pub algorithm: ::core::option::Option<i32>,
542}
543/// The description of an encryption variant.
544/// Each variant is a single subtype that is encrypted with a single key.
545#[allow(clippy::derive_partial_eq_without_eq)]
546#[derive(Clone, PartialEq, ::prost::Message)]
547pub struct EncryptionVariant {
548    /// the column id of the root
549    #[prost(uint32, optional, tag = "1")]
550    pub root: ::core::option::Option<u32>,
551    /// The master key that was used to encrypt the local key, referenced as
552    /// an index into the Encryption.key list.
553    #[prost(uint32, optional, tag = "2")]
554    pub key: ::core::option::Option<u32>,
555    /// the encrypted key for the file footer
556    #[prost(bytes = "vec", optional, tag = "3")]
557    pub encrypted_key: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
558    /// the stripe statistics for this variant
559    #[prost(message, repeated, tag = "4")]
560    pub stripe_statistics: ::prost::alloc::vec::Vec<Stream>,
561    /// encrypted file statistics as a FileStatistics
562    #[prost(bytes = "vec", optional, tag = "5")]
563    pub file_statistics: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
564}
565#[allow(clippy::derive_partial_eq_without_eq)]
566#[derive(Clone, PartialEq, ::prost::Message)]
567pub struct Encryption {
568    /// all of the masks used in this file
569    #[prost(message, repeated, tag = "1")]
570    pub mask: ::prost::alloc::vec::Vec<DataMask>,
571    /// all of the keys used in this file
572    #[prost(message, repeated, tag = "2")]
573    pub key: ::prost::alloc::vec::Vec<EncryptionKey>,
574    /// The encrypted variants.
575    /// Readers should prefer the first variant that the user has access to
576    /// the corresponding key. If they don't have access to any of the keys,
577    /// they should get the unencrypted masked data.
578    #[prost(message, repeated, tag = "3")]
579    pub variants: ::prost::alloc::vec::Vec<EncryptionVariant>,
580    /// How are the local keys encrypted?
581    #[prost(enumeration = "KeyProviderKind", optional, tag = "4")]
582    pub key_provider: ::core::option::Option<i32>,
583}
584#[allow(clippy::derive_partial_eq_without_eq)]
585#[derive(Clone, PartialEq, ::prost::Message)]
586pub struct Footer {
587    #[prost(uint64, optional, tag = "1")]
588    pub header_length: ::core::option::Option<u64>,
589    #[prost(uint64, optional, tag = "2")]
590    pub content_length: ::core::option::Option<u64>,
591    #[prost(message, repeated, tag = "3")]
592    pub stripes: ::prost::alloc::vec::Vec<StripeInformation>,
593    #[prost(message, repeated, tag = "4")]
594    pub types: ::prost::alloc::vec::Vec<Type>,
595    #[prost(message, repeated, tag = "5")]
596    pub metadata: ::prost::alloc::vec::Vec<UserMetadataItem>,
597    #[prost(uint64, optional, tag = "6")]
598    pub number_of_rows: ::core::option::Option<u64>,
599    #[prost(message, repeated, tag = "7")]
600    pub statistics: ::prost::alloc::vec::Vec<ColumnStatistics>,
601    #[prost(uint32, optional, tag = "8")]
602    pub row_index_stride: ::core::option::Option<u32>,
603    /// Each implementation that writes ORC files should register for a code
604    /// 0 = ORC Java
605    /// 1 = ORC C++
606    /// 2 = Presto
607    /// 3 = Scritchley Go from <https://github.com/scritchley/orc>
608    /// 4 = Trino
609    #[prost(uint32, optional, tag = "9")]
610    pub writer: ::core::option::Option<u32>,
611    /// information about the encryption in this file
612    #[prost(message, optional, tag = "10")]
613    pub encryption: ::core::option::Option<Encryption>,
614    #[prost(enumeration = "CalendarKind", optional, tag = "11")]
615    pub calendar: ::core::option::Option<i32>,
616    /// informative description about the version of the software that wrote
617    /// the file. It is assumed to be within a given writer, so for example
618    /// ORC 1.7.2 = "1.7.2". It may include suffixes, such as "-SNAPSHOT".
619    #[prost(string, optional, tag = "12")]
620    pub software_version: ::core::option::Option<::prost::alloc::string::String>,
621}
622/// Serialized length must be less that 255 bytes
623#[allow(clippy::derive_partial_eq_without_eq)]
624#[derive(Clone, PartialEq, ::prost::Message)]
625pub struct PostScript {
626    #[prost(uint64, optional, tag = "1")]
627    pub footer_length: ::core::option::Option<u64>,
628    #[prost(enumeration = "CompressionKind", optional, tag = "2")]
629    pub compression: ::core::option::Option<i32>,
630    #[prost(uint64, optional, tag = "3")]
631    pub compression_block_size: ::core::option::Option<u64>,
632    /// the version of the file format
633    ///    \[0, 11\] = Hive 0.11
634    ///    \[0, 12\] = Hive 0.12
635    #[prost(uint32, repeated, tag = "4")]
636    pub version: ::prost::alloc::vec::Vec<u32>,
637    #[prost(uint64, optional, tag = "5")]
638    pub metadata_length: ::core::option::Option<u64>,
639    /// The version of the writer that wrote the file. This number is
640    /// updated when we make fixes or large changes to the writer so that
641    /// readers can detect whether a given bug is present in the data.
642    ///
643    /// Only the Java ORC writer may use values under 6 (or missing) so that
644    /// readers that predate ORC-202 treat the new writers correctly. Each
645    /// writer should assign their own sequence of versions starting from 6.
646    ///
647    /// Version of the ORC Java writer:
648    ///    0 = original
649    ///    1 = HIVE-8732 fixed (fixed stripe/file maximum statistics &
650    ///                         string statistics use utf8 for min/max)
651    ///    2 = HIVE-4243 fixed (use real column names from Hive tables)
652    ///    3 = HIVE-12055 added (vectorized writer implementation)
653    ///    4 = HIVE-13083 fixed (decimals write present stream correctly)
654    ///    5 = ORC-101 fixed (bloom filters use utf8 consistently)
655    ///    6 = ORC-135 fixed (timestamp statistics use utc)
656    ///    7 = ORC-517 fixed (decimal64 min/max incorrect)
657    ///    8 = ORC-203 added (trim very long string statistics)
658    ///    9 = ORC-14 added (column encryption)
659    ///
660    /// Version of the ORC C++ writer:
661    ///    6 = original
662    ///
663    /// Version of the Presto writer:
664    ///    6 = original
665    ///
666    /// Version of the Scritchley Go writer:
667    ///    6 = original
668    ///
669    /// Version of the Trino writer:
670    ///    6 = original
671    ///
672    #[prost(uint32, optional, tag = "6")]
673    pub writer_version: ::core::option::Option<u32>,
674    /// the number of bytes in the encrypted stripe statistics
675    #[prost(uint64, optional, tag = "7")]
676    pub stripe_statistics_length: ::core::option::Option<u64>,
677    /// Leave this last in the record
678    #[prost(string, optional, tag = "8000")]
679    pub magic: ::core::option::Option<::prost::alloc::string::String>,
680}
681/// The contents of the file tail that must be serialized.
682/// This gets serialized as part of OrcSplit, also used by footer cache.
683#[allow(clippy::derive_partial_eq_without_eq)]
684#[derive(Clone, PartialEq, ::prost::Message)]
685pub struct FileTail {
686    #[prost(message, optional, tag = "1")]
687    pub postscript: ::core::option::Option<PostScript>,
688    #[prost(message, optional, tag = "2")]
689    pub footer: ::core::option::Option<Footer>,
690    #[prost(uint64, optional, tag = "3")]
691    pub file_length: ::core::option::Option<u64>,
692    #[prost(uint64, optional, tag = "4")]
693    pub postscript_length: ::core::option::Option<u64>,
694}
695#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
696#[repr(i32)]
697pub enum EncryptionAlgorithm {
698    /// used for detecting future algorithms
699    UnknownEncryption = 0,
700    AesCtr128 = 1,
701    AesCtr256 = 2,
702}
703impl EncryptionAlgorithm {
704    /// String value of the enum field names used in the ProtoBuf definition.
705    ///
706    /// The values are not transformed in any way and thus are considered stable
707    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
708    pub fn as_str_name(&self) -> &'static str {
709        match self {
710            EncryptionAlgorithm::UnknownEncryption => "UNKNOWN_ENCRYPTION",
711            EncryptionAlgorithm::AesCtr128 => "AES_CTR_128",
712            EncryptionAlgorithm::AesCtr256 => "AES_CTR_256",
713        }
714    }
715    /// Creates an enum from field names used in the ProtoBuf definition.
716    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
717        match value {
718            "UNKNOWN_ENCRYPTION" => Some(Self::UnknownEncryption),
719            "AES_CTR_128" => Some(Self::AesCtr128),
720            "AES_CTR_256" => Some(Self::AesCtr256),
721            _ => None,
722        }
723    }
724}
725/// Which KeyProvider encrypted the local keys.
726#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
727#[repr(i32)]
728pub enum KeyProviderKind {
729    Unknown = 0,
730    Hadoop = 1,
731    Aws = 2,
732    Gcp = 3,
733    Azure = 4,
734}
735impl KeyProviderKind {
736    /// String value of the enum field names used in the ProtoBuf definition.
737    ///
738    /// The values are not transformed in any way and thus are considered stable
739    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
740    pub fn as_str_name(&self) -> &'static str {
741        match self {
742            KeyProviderKind::Unknown => "UNKNOWN",
743            KeyProviderKind::Hadoop => "HADOOP",
744            KeyProviderKind::Aws => "AWS",
745            KeyProviderKind::Gcp => "GCP",
746            KeyProviderKind::Azure => "AZURE",
747        }
748    }
749    /// Creates an enum from field names used in the ProtoBuf definition.
750    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
751        match value {
752            "UNKNOWN" => Some(Self::Unknown),
753            "HADOOP" => Some(Self::Hadoop),
754            "AWS" => Some(Self::Aws),
755            "GCP" => Some(Self::Gcp),
756            "AZURE" => Some(Self::Azure),
757            _ => None,
758        }
759    }
760}
761#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
762#[repr(i32)]
763pub enum CalendarKind {
764    UnknownCalendar = 0,
765    /// A hybrid Julian/Gregorian calendar with a cutover point in October 1582.
766    JulianGregorian = 1,
767    /// A calendar that extends the Gregorian calendar back forever.
768    ProlepticGregorian = 2,
769}
770impl CalendarKind {
771    /// String value of the enum field names used in the ProtoBuf definition.
772    ///
773    /// The values are not transformed in any way and thus are considered stable
774    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
775    pub fn as_str_name(&self) -> &'static str {
776        match self {
777            CalendarKind::UnknownCalendar => "UNKNOWN_CALENDAR",
778            CalendarKind::JulianGregorian => "JULIAN_GREGORIAN",
779            CalendarKind::ProlepticGregorian => "PROLEPTIC_GREGORIAN",
780        }
781    }
782    /// Creates an enum from field names used in the ProtoBuf definition.
783    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
784        match value {
785            "UNKNOWN_CALENDAR" => Some(Self::UnknownCalendar),
786            "JULIAN_GREGORIAN" => Some(Self::JulianGregorian),
787            "PROLEPTIC_GREGORIAN" => Some(Self::ProlepticGregorian),
788            _ => None,
789        }
790    }
791}
792#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
793#[repr(i32)]
794pub enum CompressionKind {
795    None = 0,
796    Zlib = 1,
797    Snappy = 2,
798    Lzo = 3,
799    Lz4 = 4,
800    Zstd = 5,
801}
802impl CompressionKind {
803    /// String value of the enum field names used in the ProtoBuf definition.
804    ///
805    /// The values are not transformed in any way and thus are considered stable
806    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
807    pub fn as_str_name(&self) -> &'static str {
808        match self {
809            CompressionKind::None => "NONE",
810            CompressionKind::Zlib => "ZLIB",
811            CompressionKind::Snappy => "SNAPPY",
812            CompressionKind::Lzo => "LZO",
813            CompressionKind::Lz4 => "LZ4",
814            CompressionKind::Zstd => "ZSTD",
815        }
816    }
817    /// Creates an enum from field names used in the ProtoBuf definition.
818    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
819        match value {
820            "NONE" => Some(Self::None),
821            "ZLIB" => Some(Self::Zlib),
822            "SNAPPY" => Some(Self::Snappy),
823            "LZO" => Some(Self::Lzo),
824            "LZ4" => Some(Self::Lz4),
825            "ZSTD" => Some(Self::Zstd),
826            _ => None,
827        }
828    }
829}