Skip to content

Commit

Permalink
Use the term "Batch Sorted Merge" in EXPLAIN
Browse files Browse the repository at this point in the history
Currently it says "sorted merge append" and that's the only remnant of
the old name.
  • Loading branch information
akuzm committed Dec 6, 2023
1 parent 21f6d82 commit 2431435
Show file tree
Hide file tree
Showing 8 changed files with 195 additions and 195 deletions.
2 changes: 1 addition & 1 deletion tsl/src/nodes/decompress_chunk/decompress_chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ ts_decompress_chunk_generate_paths(PlannerInfo *root, RelOptInfo *chunk_rel, Hyp
path = (Path *) decompress_chunk_path_create(root, compression_info, 0, compressed_path);

/*
* Create a path for the sorted merge append optimization. This optimization performs a
* Create a path for the batch sorted merge optimization. This optimization performs a
* merge append of the involved batches by using a binary heap and preserving the
* compression order. This optimization is only taken into consideration if we can't push
* down the sort to the compressed chunk. If we can push down the sort, the batches can be
Expand Down
4 changes: 2 additions & 2 deletions tsl/src/nodes/decompress_chunk/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static const struct BatchQueueFunctions BatchQueueFunctionsHeap = {
/*
* Build the sortkeys data structure from the list structure in the
* custom_private field of the custom scan. This sort info is used to sort
* binary heap used for sorted merge append.
* binary heap used for batch sorted merge.
*/
static void
build_batch_sorted_merge_info(DecompressChunkState *chunk_state)
Expand Down Expand Up @@ -892,7 +892,7 @@ decompress_chunk_explain(CustomScanState *node, List *ancestors, ExplainState *e
{
if (chunk_state->batch_sorted_merge)
{
ExplainPropertyBool("Sorted merge append", chunk_state->batch_sorted_merge, es);
ExplainPropertyBool("Batch Sorted Merge", chunk_state->batch_sorted_merge, es);
}

if (es->analyze && (es->verbose || es->format != EXPLAIN_FORMAT_TEXT))
Expand Down
52 changes: 26 additions & 26 deletions tsl/test/expected/compression.out

Large diffs are not rendered by default.

80 changes: 40 additions & 40 deletions tsl/test/expected/compression_sorted_merge-13.out

Large diffs are not rendered by default.

80 changes: 40 additions & 40 deletions tsl/test/expected/compression_sorted_merge-14.out

Large diffs are not rendered by default.

80 changes: 40 additions & 40 deletions tsl/test/expected/compression_sorted_merge-15.out

Large diffs are not rendered by default.

80 changes: 40 additions & 40 deletions tsl/test/expected/compression_sorted_merge-16.out

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions tsl/test/sql/compression.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1032,11 +1032,11 @@ ANALYZE sensor_data_compressed;

SELECT * FROM sensor_data_compressed ORDER BY time DESC LIMIT 5;

-- Only the first chunks should be accessed (sorted merge append is enabled)
-- Only the first chunks should be accessed (batch sorted merge is enabled)
:PREFIX
SELECT * FROM sensor_data_compressed ORDER BY time DESC LIMIT 5;

-- Only the first chunks should be accessed (sorted merge append is disabled)
-- Only the first chunks should be accessed (batch sorted merge is disabled)
SET timescaledb.enable_decompression_sorted_merge = FALSE;
:PREFIX
SELECT * FROM sensor_data_compressed ORDER BY time DESC LIMIT 5;
Expand All @@ -1047,11 +1047,11 @@ SELECT compress_chunk(ch, if_not_compressed => true) FROM show_chunks('sensor_da

SELECT * FROM sensor_data_compressed ORDER BY time DESC LIMIT 5;

-- Only the first chunks should be accessed (sorted merge append is enabled)
-- Only the first chunks should be accessed (batch sorted merge is enabled)
:PREFIX
SELECT * FROM sensor_data_compressed ORDER BY time DESC LIMIT 5;

-- Only the first chunks should be accessed (sorted merge append is disabled)
-- Only the first chunks should be accessed (batch sorted merge is disabled)
SET timescaledb.enable_decompression_sorted_merge = FALSE;
:PREFIX
SELECT * FROM sensor_data_compressed ORDER BY time DESC LIMIT 5;
Expand All @@ -1061,11 +1061,11 @@ RESET timescaledb.enable_decompression_sorted_merge;
INSERT INTO sensor_data_compressed (time, sensor_id, cpu, temperature)
VALUES ('1980-01-02 01:00:00-00', 2, 4, 14.0);

-- Only the first chunks should be accessed (sorted merge append is enabled)
-- Only the first chunks should be accessed (batch sorted merge is enabled)
:PREFIX
SELECT * FROM sensor_data_compressed ORDER BY time DESC LIMIT 5;

-- Only the first chunks should be accessed (sorted merge append is disabled)
-- Only the first chunks should be accessed (batch sorted merge is disabled)
SET timescaledb.enable_decompression_sorted_merge = FALSE;
:PREFIX
SELECT * FROM sensor_data_compressed ORDER BY time DESC LIMIT 5;
Expand Down

0 comments on commit 2431435

Please sign in to comment.