|
| 1 | +/* |
| 2 | + * Copyright (2024) The Delta Lake Project Authors. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +package io.delta.kernel.actions; |
| 18 | + |
| 19 | +import io.delta.kernel.annotation.Evolving; |
| 20 | +import java.util.List; |
| 21 | +import java.util.Map; |
| 22 | +import java.util.Optional; |
| 23 | + |
| 24 | +/** |
| 25 | + * Interface for metadata actions in Delta. The metadata defines the metadata of the table. |
| 26 | + * |
| 27 | + * @since 3.4.0 |
| 28 | + */ |
| 29 | +@Evolving |
| 30 | +public interface AbstractMetadata { |
| 31 | + |
| 32 | + /** A unique table identifier. */ |
| 33 | + String getId(); |
| 34 | + |
| 35 | + /** User-specified table identifier. */ |
| 36 | + // TODO: this should be Optional<String>. Delta protocol defines 'name' as optional. |
| 37 | + String getName(); |
| 38 | + |
| 39 | + /** User-specified table description. */ |
| 40 | + // TODO: this should be Optional<String>. Delta protocol defines 'description' as optional. |
| 41 | + String getDescription(); |
| 42 | + |
| 43 | + /** The table provider format. */ |
| 44 | + String getProvider(); |
| 45 | + |
| 46 | + /** The format options */ |
| 47 | + Map<String, String> getFormatOptions(); |
| 48 | + |
| 49 | + /** The table schema in string representation. */ |
| 50 | + String getSchemaString(); |
| 51 | + |
| 52 | + /** List of partition columns. */ |
| 53 | + List<String> getPartitionColumns(); |
| 54 | + |
| 55 | + /** The table properties defined on the table. */ |
| 56 | + Map<String, String> getConfiguration(); |
| 57 | + |
| 58 | + /** Timestamp for the creation of this metadata. */ |
| 59 | + Optional<Long> getCreatedTime(); |
| 60 | +} |
0 commit comments