mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-17 02:53:51 +08:00
When a query has a filter that only needs to be evaluated once per query it will be represented as a Result node with the filter condition on the Result node and the actual query as child of the result node. find_data_node_scan_state_child did not consider Result node as valid node to contain a DataNodeScan node leading to a `unexpected child node of Append or MergeAppend: 62` for queries that had one-time filter with a subquery.
15 lines
396 B
SQL
15 lines
396 B
SQL
-- This file and its contents are licensed under the Timescale License.
|
|
-- Please see the included NOTICE for copyright information and
|
|
-- LICENSE-TIMESCALE for a copy of the license.
|
|
|
|
-- Test DataNodeScan with subquery with one-time filter
|
|
SELECT
|
|
id
|
|
FROM
|
|
insert_test
|
|
WHERE
|
|
NULL::int2 >= NULL::int2 OR
|
|
EXISTS (SELECT 1 from dist_chunk_copy WHERE insert_test.id IS NOT NULL)
|
|
ORDER BY id;
|
|
|