Skip to content

Commit

Permalink
Fix partialize_finalize test output
Browse files Browse the repository at this point in the history
In a409065 the output of the
partialize_finalize test was updated and doesn't match the actual test
output. Therefore, the test fails in several environments. In addition,
this PR removes the binary data part of the test to make it compatible
with PG >= 15.
  • Loading branch information
jnidzwetzki committed Oct 26, 2023
1 parent 53e9747 commit 50578e4
Show file tree
Hide file tree
Showing 8 changed files with 914 additions and 40 deletions.
5 changes: 1 addition & 4 deletions .github/gh_matrix_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,12 @@ def macos_config(overrides):


# common ignored tests for all scheduled pg15 tests
# partialize_finalize is ignored due to #4937
ignored_tests = {"partialize_finalize"}
ignored_tests = {}

# common ignored tests for all non-scheduled pg15 tests (e.g. PRs)
# partialize_finalize is ignored due to #4937
# dist_move_chunk, dist_param, dist_insert, and remote_txn ignored due to flakiness
if pull_request:
ignored_tests = {
"partialize_finalize",
"telemetry",
}

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/abi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,10 @@ jobs:
pg: 15
builder: ${{ fromJson(needs.config.outputs.pg15_latest) }}
tester: ${{ fromJson(needs.config.outputs.pg15_abi_min) }}
ignores: partialize_finalize
- test: 15forward
pg: 15
builder: ${{ fromJson(needs.config.outputs.pg15_abi_min) }}
tester: ${{ fromJson(needs.config.outputs.pg15_latest) }}
ignores: partialize_finalize

steps:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-32bit-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
CXX: clang++-14
DEBIAN_FRONTEND: noninteractive
IGNORES: "append-* debug_notice transparent_decompression-*
transparent_decompress_chunk-* pg_dump partialize_finalize
transparent_decompress_chunk-* pg_dump
dist_move_chunk dist_param dist_insert remote_txn telemetry"
SKIPS: chunk_adaptive histogram_test-*
strategy:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/sanitizer-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ jobs:
pg: ${{ fromJson(needs.config.outputs.pg_latest) }}
include:
- pg: ${{ fromJson(needs.config.outputs.pg15_latest) }}
# partialize_finalize is ignored in PG15 due to #4937
ignores_version: partialize_finalize
skips_version: 002_replication_telemetry 003_connections_privs 004_multinode_rdwr_1pc
steps:
- name: Install Linux Dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
os: [ windows-2022 ]
build_type: ${{ fromJson(needs.config.outputs.build_type) }}
ignores: ["chunk_adaptive metadata telemetry"]
tsl_ignores: ["compression_algos remote_connection telemetry_stats dist_move_chunk dist_param dist_insert dist_backup dist_cagg partialize_finalize"]
tsl_ignores: ["compression_algos remote_connection telemetry_stats dist_move_chunk dist_param dist_insert dist_backup dist_cagg"]
tsl_skips: ["bgw_db_scheduler bgw_db_scheduler_fixed cagg_ddl_dist_ht
data_fetcher dist_compression dist_remote_error remote_txn"]
pg_config: ["-cfsync=off -cstatement_timeout=60s"]
Expand Down
917 changes: 911 additions & 6 deletions tsl/test/expected/partialize_finalize.out

Large diffs are not rendered by default.

14 changes: 0 additions & 14 deletions tsl/test/sql/data/partialize_finalize_data.csv

This file was deleted.

10 changes: 0 additions & 10 deletions tsl/test/sql/partialize_finalize.sql
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,6 @@ from t1 group by a order by a ;
SELECT * FROM vfinal;
CREATE TABLE vfinal_res AS SELECT * FROM vfinal;

-- overwrite partials with dumped binary values from PostrgeSQL 13 --
TRUNCATE TABLE t1;
\COPY t1 FROM data/partialize_finalize_data.csv WITH CSV HEADER

--repeat query to verify partial serialization sanitization works for versions PG >= 14
CREATE TABLE vfinal_dump_res AS SELECT * FROM vfinal;

-- compare results to verify there is no difference
(SELECT * FROM vfinal_res) EXCEPT (SELECT * FROM vfinal_dump_res);

--with having clause --
select a, b , _timescaledb_functions.finalize_agg( 'min(text)', 'pg_catalog', 'default', null, partialc, null::text ) minc, _timescaledb_functions.finalize_agg( 'max(timestamp with time zone)', null, null, null, partiald, null::timestamptz ) maxd from t1 where b is not null group by a, b having _timescaledb_functions.finalize_agg( 'max(timestamp with time zone)', null, null, null, partiald, null::timestamptz ) is not null order by a, b;

Expand Down

0 comments on commit 50578e4

Please sign in to comment.