paimon/spec/manifest_common.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
18use serde_repr::{Deserialize_repr, Serialize_repr};
19
20/// Kind of a file.
21/// Impl Reference: <https://github.com/apache/paimon/blob/release-0.8.2/paimon-core/src/main/java/org/apache/paimon/manifest/FileKind.java>
22#[derive(PartialEq, Eq, Debug, Clone, Serialize_repr, Deserialize_repr)]
23#[repr(u8)]
24pub enum FileKind {
25 Add = 0,
26 Delete = 1,
27}
28
29/// The Source of a file.
30/// Impl References: <https://github.com/apache/paimon/blob/release-0.8.2/paimon-core/src/main/java/org/apache/paimon/manifest/FileSource.java>
31#[allow(dead_code)] // Part of spec; used when file source is needed.
32#[derive(PartialEq, Eq, Debug, Clone, Serialize_repr, Deserialize_repr)]
33#[repr(u8)]
34pub enum FileSource {
35 Append = 0,
36 Compact = 1,
37}