You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each JSTable is stored in a single binary file using the [JSONB](https://github.com/databendlabs/jsonb) format.
7
+
The file consists of a sequence of entries. Each entry is encoded as:
8
+
1.**Length**: A 4-byte unsigned integer (little-endian) indicating the size of the following JSONB blob.
9
+
2.**Data**: A binary blob encoded using the JSONB format.
10
+
11
+
## Structure
12
+
13
+
1.**Header Entry**: The first entry in the file. It is a JSONB-encoded object containing:
14
+
*`timestamp`: The time the table was created (Unix timestamp in milliseconds).
15
+
*`schema`: The JSON Schema for the documents.
16
+
2.**Record Entries**: All subsequent entries. Each is a JSONB-encoded array `[id, document]`:
17
+
*`id`: String.
18
+
*`document`: The document object (or `null` for tombstone).
22
19
23
20
## Compression
24
21
25
-
Documents are stored as full JSON objects. This means that no compression is currently applied.
22
+
Documents are stored using the JSONB binary format, which is generally more compact than text JSON.
26
23
A document can be `null` to indicate that it has been deleted.
27
-
Future versions of the format might include schema-based compression. For example, if a field must be an integer, the type information need not be stored with each document. If a field can have multiple possible types, then the type information must be stored with each document.
24
+
Future versions might include schema-based compression.
0 commit comments