OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TableMetadata.h
Go to the documentation of this file.
1 /* Copyright 2020 OmniSci, Inc.
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #pragma once
16 #include <string>
17 #include "TableDescriptor.h"
18 struct TableMetadata {
19  int32_t table_id;
20  std::string table_name;
21  int32_t owner_id;
22  std::string owner_name;
24  int32_t num_columns;
25  bool is_sharded;
26  int32_t num_shards;
27  int64_t max_rows;
28  int32_t fragment_size;
30  int32_t min_epoch;
31  int32_t max_epoch;
32  int32_t min_epoch_floor;
33  int32_t max_epoch_floor;
34  int64_t num_bytes;
35  int64_t num_files;
36  int64_t num_pages;
38  : table_id(td->tableId)
39  , table_name(td->tableName)
40  , owner_id(td->userId)
41  , is_temp_table(td->persistenceLevel != Data_Namespace::MemoryLevel::DISK_LEVEL)
42  , num_columns(td->nColumns)
43  , is_sharded(td->nShards > 0)
44  , num_shards(td->nShards)
45  , max_rows(td->maxRows)
46  , fragment_size(td->maxFragRows)
47  , max_rollback_epochs(td->maxRollbackEpochs) {}
48 };
int32_t fragment_size
Definition: TableMetadata.h:28
int32_t num_columns
Definition: TableMetadata.h:24
int32_t min_epoch_floor
Definition: TableMetadata.h:32
int32_t max_epoch_floor
Definition: TableMetadata.h:33
std::string owner_name
Definition: TableMetadata.h:22
std::string table_name
Definition: TableMetadata.h:20
int32_t max_rollback_epochs
Definition: TableMetadata.h:29
int32_t min_epoch
Definition: TableMetadata.h:30
int64_t max_rows
Definition: TableMetadata.h:27
int64_t num_files
Definition: TableMetadata.h:35
int64_t num_bytes
Definition: TableMetadata.h:34
int32_t table_id
Definition: TableMetadata.h:19
int32_t max_epoch
Definition: TableMetadata.h:31
int32_t num_shards
Definition: TableMetadata.h:26
int64_t num_pages
Definition: TableMetadata.h:36
TableMetadata(const TableDescriptor *td)
Definition: TableMetadata.h:37
int32_t owner_id
Definition: TableMetadata.h:21