Re: Row pattern recognition - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: Row pattern recognition
Date
Msg-id 20260417.191303.359804214243525887.ishii@postgresql.org
Whole thread
In response to Re: Row pattern recognition  (Tatsuo Ishii <ishii@postgresql.org>)
Responses Re: Row pattern recognition
List pgsql-hackers
Hi Henson,

Note that applying 0001-0006 produced compiler warning.

execExprInterp.c: In function ‘ExecEvalRPRNavSet’:
execExprInterp.c:6005:23: warning: ‘target_pos’ may be used uninitialized [-Wmaybe-uninitialized]
 6005 |         target_slot = ExecRPRNavGetSlot(winstate, target_pos);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
execExprInterp.c:5959:25: note: ‘target_pos’ was declared here
 5959 |         int64           target_pos;
      |                         ^~~~~~~~~~

But regression test was ok.
However, after applying 0007, regression test failed.

not ok 196   + rpr_integration                           514 ms
# (test process exited with exit code 2)
# parallel group (9 tests):  jsonpath jsonpath_encoding jsonb_jsonpath sqljson_queryfuncs json_encoding json
sqljson_jsontablejsonb sqljson
 
not ok 197   + json                                       29 ms
# (test process exited with exit code 2)
not ok 198   + jsonb                                      29 ms
# (test process exited with exit code 2)
[snip]

From rpr_integration.out:

-- Verify both produce different results
SELECT
    id, val,
    count(*) OVER w_rpr AS rpr_cnt,
    count(*) OVER w_normal AS normal_cnt
FROM rpr_integ
WINDOW
    w_rpr AS (ORDER BY id
        ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING
        PATTERN (A B+)
        DEFINE B AS val > PREV(val)),
    w_normal AS (ORDER BY id
        ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING)
ORDER BY id;
server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
connection to server was lost

Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp

pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: Fix stats reporting delays in logical parallel apply worker
Next
From: Thomas Munro
Date:
Subject: Re: repack: fix uninitialized DecodingWorkerShared.initialized