diff --git a/tests/compatibility/cases/snapshot_parquet_copy/case.toml b/tests/compatibility/cases/snapshot_parquet_copy/case.toml new file mode 100644 index 00000000000..28b6a4b69da --- /dev/null +++ b/tests/compatibility/cases/snapshot_parquet_copy/case.toml @@ -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" diff --git a/tests/compatibility/cases/snapshot_parquet_copy/setup.sql b/tests/compatibility/cases/snapshot_parquet_copy/setup.sql new file mode 100644 index 00000000000..8342e1847b5 --- /dev/null +++ b/tests/compatibility/cases/snapshot_parquet_copy/setup.sql @@ -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; diff --git a/tests/compatibility/cases/snapshot_parquet_copy/verify.result b/tests/compatibility/cases/snapshot_parquet_copy/verify.result new file mode 100644 index 00000000000..d3e4d2483ab --- /dev/null +++ b/tests/compatibility/cases/snapshot_parquet_copy/verify.result @@ -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 | ++-------------------------+-----+ diff --git a/tests/compatibility/cases/snapshot_parquet_copy/verify.sql b/tests/compatibility/cases/snapshot_parquet_copy/verify.sql new file mode 100644 index 00000000000..c782dcacb1b --- /dev/null +++ b/tests/compatibility/cases/snapshot_parquet_copy/verify.sql @@ -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;