Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wTV3U-000ZPl-1J for pgsql-hackers@arkaria.postgresql.org; Sun, 31 May 2026 01:33:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wTV3Q-006gtz-2v for pgsql-hackers@arkaria.postgresql.org; Sun, 31 May 2026 01:33:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wTV3Q-006gtr-1V for pgsql-hackers@lists.postgresql.org; Sun, 31 May 2026 01:33:28 +0000 Received: from meldrar.postgresql.org ([2a02:c0:301:0:ffff::31]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wTV3M-00000000OZl-2gSR for pgsql-hackers@postgresql.org; Sun, 31 May 2026 01:33:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Content-Transfer-Encoding:Content-Type: Mime-Version:References:In-Reply-To:From:Subject:Cc:To:Message-Id:Date:Sender :Reply-To:Content-ID:Content-Description; bh=4TEoEjrdw04xTkmejrlrHgdq9FQQJPygpWizHVoiUSI=; b=0lc3RNJ5x2bmDXzNpqF9O/wvgS +LSjO9Y4cAswGY6R/hPTbvDUudeyrZ35MyKQSlMtRXDpeGg0wDp2b3oquXSUR3YLY6F6y3mPbNeWt osdMtuDI3NoMO+dzscZK+77fYR3cQV9909BE7CBwfM+lsDlU9GIhjYkA1CUi+dYB6iL2gx3Xoj9x8 KvMLcG5bW8nOD5jAhs5bcygDqxjH1SAfLGr1f3DuP3eEWa0oUw0u2lkt3pa/5Spie+9Slzqr4pYRL JhhA40HQESZpjATTXFJKZAImGo4qgN0O8vqBCstJysOg78B91na6DJ2zndCYSkF+dR3JfnFd6xFI4 gj3WBMdA==; Received: from [2409:11:4120:300:699b:4756:109:2dbc] (helo=localhost) by meldrar.postgresql.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wTV3B-0016Ex-2k; Sun, 31 May 2026 01:33:18 +0000 Date: Sun, 31 May 2026 10:32:58 +0900 (JST) Message-Id: <20260531.103258.1663537611708370752.ishii@postgresql.org> To: assam258@gmail.com Cc: jian.universality@gmail.com, zsolt.parragi@percona.com, sjjang112233@gmail.com, vik@postgresfriends.org, er@xs4all.nl, jacob.champion@enterprisedb.com, david.g.johnston@gmail.com, peter@eisentraut.org, li.evan.chao@gmail.com, pgsql-hackers@postgresql.org Subject: Re: Row pattern recognition From: Tatsuo Ishii In-Reply-To: References: <20260517.190023.159085681032648582.ishii@postgresql.org> X-Mailer: Mew version 6.8 on Emacs 29.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2409:11:4120:300:699b:4756:109:2dbc (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Henson, >> For src/backend/executor/README.rpr: >> We should explicitly explain 'absorbable' and 'absorption' somewhere in >> README.rpr, as the text currently just assumes the reader knows what they > mean. >> Using some example illustrate "absorption" meaning, put it on >> README.rpr would be great. >> We can also mention that 'DFS' refers to Depth-First Search". > > Acknowledged, and the request surfaced an underlying problem in the > README's terminology. "Absorption" is currently used for two > distinct things: an AST-level rewrite in Phase 1 that pulls > identical sequences around a group inside it, and the runtime > context-equivalence collapse that drives the O(n^2) -> O(n) > optimization. Sharing the word leaves a reader encountering > "absorbable" early on without an anchor. > > Rather than disambiguate by qualifier ("prefix/suffix absorption" > vs "context absorption"), I'd lean toward renaming the AST-level > case so "absorption" stays reserved for the runtime concept. The > README then only needs to explain absorption in one place, in > detail, without the disambig preamble. > > For the rename, "prefix/suffix merging" feels like the natural fit > -- the other AST-level optimizations in the same Phase 1 are already > named "consecutive variable / group / ALT merging", so it slots in > cleanly. "Prefix/suffix factoring" is another candidate if a more > descriptive verb is preferred. > > Tatsuo, curious what you think of this direction and naming. Happy > to take any name you prefer for the AST-level operation, or to keep > the original "absorption" wording with stronger forward-references > if you'd rather not rename. Although I don't have any particular strong preferences, keeping "absorption" for the runtime concept sounds good to me. For AST level name changing, "prefix/suffix merging" seems to be already used in other areas according to Google: LLM, Linker, and string manipulation in DNA. In the normal expression engine area, it looks like "flattening nested quantifiers" or "quantifiers reduction" are used for the case. So, for example, "prefix/suffix quantifiers reduction" seems to be more appropriate? (If you don't mind it's too long) In any case, I would like to respect your opinion. Regards, -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp