mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-10-12 15:02:32 +00:00
test: cover snapshot parquet restore compatibility
Signed-off-by: jeremyhi <fengjiachun@gmail.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
name = "snapshot_parquet_copy"
|
||||
reason = "Preserve explicit-file Parquet restore from snapshots written before packed import support."
|
||||
introduced_by = "packed snapshot reader"
|
||||
topologies = ["standalone"]
|
||||
from_range = ["*"]
|
||||
to_range = ["*"]
|
||||
features = ["copy", "parquet"]
|
||||
owner = "GreptimeTeam"
|
||||
@@ -0,0 +1,4 @@
|
||||
CREATE TABLE snapshot_values (ts TIMESTAMP TIME INDEX, val BIGINT);
|
||||
INSERT INTO snapshot_values VALUES (1, 42), (2, 7);
|
||||
COPY snapshot_values TO '${SQLNESS_HOME}/snapshot_parquet_copy/values.parquet' WITH (FORMAT='parquet');
|
||||
TRUNCATE TABLE snapshot_values;
|
||||
@@ -0,0 +1,12 @@
|
||||
COPY snapshot_values FROM '${SQLNESS_HOME}/snapshot_parquet_copy/values.parquet' WITH (FORMAT='parquet');
|
||||
|
||||
Affected Rows: 2
|
||||
|
||||
SELECT * FROM snapshot_values ORDER BY ts;
|
||||
|
||||
+-------------------------+-----+
|
||||
| ts | val |
|
||||
+-------------------------+-----+
|
||||
| 1970-01-01T00:00:00.001 | 42 |
|
||||
| 1970-01-01T00:00:00.002 | 7 |
|
||||
+-------------------------+-----+
|
||||
@@ -0,0 +1,2 @@
|
||||
COPY snapshot_values FROM '${SQLNESS_HOME}/snapshot_parquet_copy/values.parquet' WITH (FORMAT='parquet');
|
||||
SELECT * FROM snapshot_values ORDER BY ts;
|
||||
Reference in New Issue
Block a user