mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-11-26 12:44:10 +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>
60 lines
2.4 KiB
Plaintext
60 lines
2.4 KiB
Plaintext
SELECT ts, host, val FROM t_downgrade_compatibility ORDER BY ts, host;
|
|
|
|
+---------------------+--------+-----+
|
|
| ts | host | val |
|
|
+---------------------+--------+-----+
|
|
| 2024-02-09T00:00:00 | host_a | 1 |
|
|
| 2024-02-09T00:01:00 | host_b | 2 |
|
|
+---------------------+--------+-----+
|
|
|
|
SELECT ts, host, val FROM t_preserve_sequence_downgrade ORDER BY ts, host;
|
|
|
|
+---------------------+--------+-----+
|
|
| ts | host | val |
|
|
+---------------------+--------+-----+
|
|
| 2024-02-09T00:00:00 | host_a | 1 |
|
|
| 2024-02-09T00:01:00 | host_b | 2 |
|
|
| 2024-02-09T00:02:00 | host_a | 3 |
|
|
| 2024-02-09T00:03:00 | host_c | 4 |
|
|
+---------------------+--------+-----+
|
|
|
|
SELECT ts, host, f, d
|
|
FROM t_sst_float_field_encoding_downgrade
|
|
ORDER BY ts, host;
|
|
|
|
+---------------------+--------+------+-------+
|
|
| ts | host | f | d |
|
|
+---------------------+--------+------+-------+
|
|
| 2024-02-10T00:00:00 | host_a | 1.25 | 10.5 |
|
|
| 2024-02-10T00:01:00 | host_b | -2.5 | 20.25 |
|
|
| 2024-02-10T00:02:00 | host_c | | |
|
|
+---------------------+--------+------+-------+
|
|
|
|
-- Older binaries don't recognize the bloom blob written by the current one and must
|
|
-- scan without pruning instead of probing it with their own tokens.
|
|
SELECT ts, msg FROM t_fulltext_bloom_v2_downgrade WHERE msg @@ 'hello_world' ORDER BY ts;
|
|
|
|
+-------------------------+-------------+
|
|
| ts | msg |
|
|
+-------------------------+-------------+
|
|
| 1970-01-01T00:00:00.001 | hello_world |
|
|
+-------------------------+-------------+
|
|
|
|
SELECT ts, msg FROM t_fulltext_bloom_v2_downgrade WHERE msg @@ '错误error日志' ORDER BY ts;
|
|
|
|
+-------------------------+---------------+
|
|
| ts | msg |
|
|
+-------------------------+---------------+
|
|
| 1970-01-01T00:00:00.002 | 错误error日志 |
|
|
+-------------------------+---------------+
|
|
|
|
SELECT ts, span_id, ts_end FROM t_column_encoding_downgrade ORDER BY ts;
|
|
|
|
+-------------------------+---------+----------------------------+
|
|
| ts | span_id | ts_end |
|
|
+-------------------------+---------+----------------------------+
|
|
| 1970-01-01T00:00:00.001 | a1 | 1970-01-01T00:00:00.000001 |
|
|
| 1970-01-01T00:00:00.002 | a2 | 1970-01-01T00:00:00.000002 |
|
|
| 1970-01-01T00:00:00.003 | | |
|
|
+-------------------------+---------+----------------------------+
|