Re: Row pattern recognition

From: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
To: jacob(dot)champion(at)enterprisedb(dot)com, vik(at)postgresfriends(dot)org
Cc: pgsql-hackers(at)postgresql(dot)org, er(at)xs4all(dot)nl, peter(at)eisentraut(dot)org
Subject: Re: Row pattern recognition
Date: 2024-04-28 11:28:26
Message-ID: 20240428.202826.1727902698809335438.t-ishii@sranhm.sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>> I think returning zero would match Vik's explanation upthread [1],
>> yes. Unfortunately I don't have a spec handy to double-check for
>> myself right now.
>
> Ok. I believe you and Vik are correct.
> I am modifying the patch in this direction.

Attached are the v17 patches in the direction. Differences from v16
include:

- In 0005 executor patch, aggregation in RPR always restarts for each
row. This is necessary to run aggregates on no matching (due to
skipping) or empty matching (due to no pattern variables matches)
rows to produce NULL (most aggregates) or 0 (count) properly. In v16
I had a hack using a flag to force the aggregation results to be
NULL in case of no match or empty match in
finalize_windowaggregate(). v17 eliminates the dirty hack.

- 0006 docs and 0007 test patches are adjusted to reflect the RPR
output chages in 0005.

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp

Attachment Content-Type Size
v17-0001-Row-pattern-recognition-patch-for-raw-parser.patch text/x-patch 19.9 KB
v17-0002-Row-pattern-recognition-patch-parse-analysis.patch text/x-patch 11.5 KB
v17-0003-Row-pattern-recognition-patch-rewriter.patch text/x-patch 4.1 KB
v17-0004-Row-pattern-recognition-patch-planner.patch text/x-patch 6.6 KB
v17-0005-Row-pattern-recognition-patch-executor.patch text/x-patch 52.8 KB
v17-0006-Row-pattern-recognition-patch-docs.patch text/x-patch 9.7 KB
v17-0007-Row-pattern-recognition-patch-tests.patch text/x-patch 46.2 KB
v17-0008-Allow-to-print-raw-parse-tree.patch text/x-patch 750 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2024-04-28 11:36:51 Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Previous Message Alexander Lakhin 2024-04-28 11:00:00 Re: Add SPLIT PARTITION/MERGE PARTITIONS commands