-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: standardize file format names & stop wrapping Footer contents …
…in messages (#1275)
- Loading branch information
1 parent
5e07dc9
commit 9c486c4
Showing
43 changed files
with
981 additions
and
982 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,48 @@ | ||
/// A `Buffer` is a simple container for the `begin` and `end` byte offsets within the file. | ||
/// These offsets are absolute (i.e., relative to the start of the file). | ||
struct Buffer { | ||
begin: uint64; | ||
end: uint64; | ||
} | ||
|
||
/// A `Layout` is a recursive data structure that describes the physical layout of the data in a Vortex file. | ||
/// As a starting, concrete example, the first three Layout encodings are defined as: | ||
/// | ||
/// 1. encoding == 1, `Flat` -> one buffer, zero child Layouts | ||
/// 2. encoding == 2, `Chunked` -> zero buffers, one or more child Layouts (used for chunks of rows) | ||
/// 3. encoding == 3, `Columnar` -> zero buffers, one or more child Layouts (used for columns of structs) | ||
/// | ||
/// The `row_count` represents the number of rows represented by this Layout. This is very useful for | ||
/// pruning the Layout tree based on row filters. | ||
/// | ||
/// The `metadata` field is fully opaque at this layer, and allows the Layout implementation corresponding to | ||
/// `encoding` to embed additional information that may be useful for the reader. For example, the `ChunkedLayout` | ||
/// uses the first byte of the `metadata` array as a boolean to indicate whether the first child Layout represents | ||
/// the statistics table for the other chunks. | ||
table Layout { | ||
encoding: uint16; | ||
buffers: [Buffer]; | ||
children: [Layout]; | ||
length: uint64; | ||
metadata: [ubyte]; | ||
} | ||
|
||
table Footer { | ||
layout: Layout; | ||
row_count: uint64; | ||
metadata: [ubyte]; | ||
} | ||
|
||
/// The `Postscript` is guaranteed by the file format to never exceed 65528 bytes (i.e., u16::MAX - 8 bytes) | ||
/// in length, and is immediately followed by an 8-byte `EndOfFile` struct. | ||
/// | ||
/// The `EndOfFile` struct cannot change size without breaking backwards compatibility. It is not written/read | ||
/// using flatbuffers, but the equivalent flatbuffer definition would be: | ||
/// | ||
/// struct EndOfFile { | ||
/// version: uint16; | ||
/// footer_length: uint16; | ||
/// magic: [uint8; 4]; // "VTXF" | ||
/// } | ||
/// | ||
table Postscript { | ||
schema_offset: uint64; | ||
footer_offset: uint64; | ||
layout_offset: uint64; | ||
} | ||
|
||
root_type Layout; | ||
root_type Postscript; | ||
root_type Footer; |
Oops, something went wrong.