The series of patches are to implement the row pattern recognition
(SQL/RPR) feature. Currently the implementation is a subset of SQL/RPR
(ISO/IEC 19075-2:2016). Namely, implementation of some features of
R020 (WINDOW clause). R010 (MATCH_RECOGNIZE) is out of the scope of
the patches.
Attached are the v42 patches.
The difference from v41 include:
- Add Peter as a reviewer to commit message. He gave a good valuable
suggestions to the gram.y patch. I accidentally forgot to credit his
name.
- Tons of enhancements from Henson.
-- Fully rewrite absorption logic (optimizer/plan/rpr.c).
Example: (a+ b* c?){2,} -> (a+" b* c?){2,}
-- Add safety check to tryMultiplyQuantifiers (optimizer/plan/rpr.c)
Example: (A{2}){2,3} cannot be rewritten to A{4,6} because it allows
5 times reputation which is not correct. Perform multiplication
optimization only in safe case.
-- Fix infinite loop/segfault when unlimited quantifiers (e.g. (A*)*,
(A+)+) are used.
-- Optimize unlimited quantifiers if possible (e.g. (A*)* -> A*, (A+)+ -> A+)
-- Fix segfault case (SELECT id, flag ...WINDOW w AS (... DEFINE T AS flag)
-- More accurate error position report
-- Some code refactoring in parser/planner patches
-- Split regression test file into rpr.sql and rpr_base.sql
-- Fix outfuncs.c and readfuncs.c
-- Fix some corner cases bug of regular expression optimization
-- Remove unused PATTERN variable to enhance performance
-- Change treatment of undefined DEFINE variables. Previously if
variable "A" is used in PATTERN but not defined in DEFINE, A is
automatically defined as "A AS TRUE". Now A is evaluated as TRUE in
executor and the generated entry for A is removed. This improves
memory usage.
-- EXPLAIN now shows the absorbable points (a+")
- Bug fix from me.
-- Assertion failure when two or more window clauses are used.
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp