39 constexpr static int32_t kInt32Max = std::numeric_limits<int32_t>::max();
42 constexpr static int32_t kFilePathColumnId = kInt32Max - 1;
43 inline static const SchemaField kFilePath = SchemaField::MakeRequired(
44 kFilePathColumnId,
"_file",
string(),
"Path of the file in which a row is stored");
46 constexpr static int32_t kFilePositionColumnId = kInt32Max - 2;
48 SchemaField::MakeRequired(kFilePositionColumnId,
"_pos",
int64(),
49 "Ordinal position of a row in the source data file");
51 constexpr static int32_t kIsDeletedColumnId = kInt32Max - 3;
52 inline static const SchemaField kIsDeleted = SchemaField::MakeRequired(
53 kIsDeletedColumnId,
"_deleted",
boolean(),
"Whether the row has been deleted");
55 constexpr static int32_t kSpecIdColumnId = kInt32Max - 4;
57 SchemaField::MakeRequired(kSpecIdColumnId,
"_spec_id",
int32(),
58 "Spec ID used to track the file containing a row");
61 constexpr static int32_t kPartitionColumnId = kInt32Max - 5;
62 constexpr static std::string_view kPartitionColumnName =
"_partition";
63 constexpr static std::string_view kPartitionColumnDoc =
64 "Partition to which a row belongs to";
66 constexpr static int32_t kContentOffsetColumnId = kInt32Max - 6;
67 constexpr static int32_t kContentSizeInBytesColumnId = kInt32Max - 7;
70 constexpr static int32_t kDeleteFilePathColumnId = kInt32Max - 101;
72 SchemaField::MakeRequired(kDeleteFilePathColumnId,
"file_path",
string(),
73 "Path of a file in which a deleted row is stored");
75 constexpr static int32_t kDeleteFilePosColumnId = kInt32Max - 102;
77 SchemaField::MakeRequired(kDeleteFilePosColumnId,
"pos",
int64(),
78 "Ordinal position of a deleted row in the data file");
81 constexpr static int32_t kDeleteFileRowColumnId = kInt32Max - 103;
82 constexpr static std::string_view kDeleteFileRowFieldName =
"row";
83 constexpr static std::string_view kDeleteFileRowDoc =
"Deleted row values";
85 constexpr static int32_t kChangeTypeColumnId = kInt32Max - 104;
86 inline static const SchemaField kChangeType = SchemaField::MakeRequired(
87 kChangeTypeColumnId,
"_change_type",
string(),
"Record type in changelog");
89 constexpr static int32_t kChangeOrdinalColumnId = kInt32Max - 105;
90 inline static const SchemaField kChangeOrdinal = SchemaField::MakeOptional(
91 kChangeOrdinalColumnId,
"_change_ordinal",
int32(),
"Change ordinal in changelog");
93 constexpr static int32_t kCommitSnapshotIdColumnId = kInt32Max - 106;
94 inline static const SchemaField kCommitSnapshotId = SchemaField::MakeOptional(
95 kCommitSnapshotIdColumnId,
"_commit_snapshot_id",
int64(),
"Commit snapshot ID");
97 constexpr static int32_t kRowIdColumnId = kInt32Max - 107;
99 SchemaField::MakeOptional(kRowIdColumnId,
"_row_id",
int64(),
100 "Implicit row ID that is automatically assigned");
102 constexpr static int32_t kLastUpdatedSequenceNumberColumnId = kInt32Max - 108;
103 inline static const SchemaField kLastUpdatedSequenceNumber = SchemaField::MakeOptional(
104 kLastUpdatedSequenceNumberColumnId,
"_last_updated_sequence_number",
int64(),
105 "Sequence number when the row was last updated");
108 static const std::set<int32_t>& MetadataFieldIds();
111 static bool IsMetadataColumn(std::string_view name);
114 static bool IsMetadataColumn(int32_t
id);
121 static Result<const SchemaField*> MetadataColumn(std::string_view name);