mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-10-22 11:52:33 +00:00
* feat: add column encoding option and set it for trace span ids COMPRESSION WITH accepts encoding = 'plain' | 'delta_binary_packed'. Either disables the dictionary for the column; delta_binary_packed is limited to integer and timestamp columns. OTLP trace v1/v2 tables now create span_id and parent_span_id with plain encoding and 64KiB pages, and timestamp_end with delta_binary_packed. Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * test: add compatibility cases for column encoding options Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * test: move column encoding downgrade checks into downgrade_compatibility Signed-off-by: Dennis Zhuang <killme2008@gmail.com> --------- Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
21 lines
541 B
SQL
21 lines
541 B
SQL
SELECT * FROM legacy_spans ORDER BY ts;
|
|
|
|
CREATE TABLE encoded_spans (
|
|
ts TIMESTAMP TIME INDEX,
|
|
span_id STRING COMPRESSION WITH (encoding = 'plain', page_size = '64KiB'),
|
|
ts_end TIMESTAMP(9) COMPRESSION WITH (encoding = 'delta_binary_packed')
|
|
);
|
|
|
|
INSERT INTO encoded_spans SELECT * FROM legacy_spans;
|
|
|
|
ADMIN FLUSH_TABLE('encoded_spans');
|
|
|
|
-- SQLNESS ARG restart=true
|
|
SHOW CREATE TABLE encoded_spans;
|
|
|
|
INSERT INTO encoded_spans VALUES (3, 'b3', 3000);
|
|
|
|
ADMIN FLUSH_TABLE('encoded_spans');
|
|
|
|
SELECT * FROM encoded_spans ORDER BY ts;
|