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.98.2) (envelope-from ) id 1xOXcn-00000000CQi-2QJ5 for pgsql-bugs@arkaria.postgresql.org; Wed, 04 Nov 2026 09:49:47 +0000 Received: from localhost ([127.0.0.1]:49492 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xOXcn-00000005Lmn-497S for pgsql-bugs@arkaria.postgresql.org; Wed, 04 Nov 2026 09:49:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]:46742) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xOXcn-00000005Lmb-2clG for pgsql-bugs@lists.postgresql.org; Wed, 04 Nov 2026 09:49:45 +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 1xOXck-00000000BAB-3p12 for pgsql-bugs@lists.postgresql.org; Wed, 04 Nov 2026 09:49:45 +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=05zr9e3f9Qu+MZ5452aywWjFUq/1YbXeuhDItG5GmRo=; b=nxnKpdLATznqiB4KyGtw91oxWO RrYE83N5urNQWDgEkOhttlIvj8JcSHGDYhTDjSoCR77TJ7F34tn6Fw5kUKBwq/G5wWLSNhXHnppq5 4BEfRxhW3uHfVjvBZ68/djVe/jsSdWiUr/jB79Vyfl37xZz15mgCKmCwTK1f1qpTneetzJssSlyfd 5yJvvPyY8WdBaxm18Lrt7AMnhGURzAvn9nyyHiPdbuBg5xOfjeZBDhQA9F2aJ3H9FDHz5nrAKublg cngEZ1tHRGPsMnhgRTK8JYIvnpTMnSIWVY2r8t430bLwpUMyNOd8P3CsdNV4IoEvIt+r/bXWXnt3X BS7AbPNw==; Received: from [2409:11:4120:300:d5e0:e8c:3d54:49b7] (helo=localhost) by meldrar.postgresql.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xOXci-00000000MeU-1bBZ; Wed, 04 Nov 2026 09:49:42 +0000 Date: Wed, 04 Nov 2026 18:49:30 +0900 (JST) Message-Id: <20261104.184930.23012853607805816.ishii@postgresql.org> To: zhong950419@gmail.com Cc: c.bhuvan@iitg.ac.in, pgsql-bugs@lists.postgresql.org Subject: Re: first_value()/nth_value() with IGNORE NULLS loop forever (EXCLUDE GROUP/TIES, frame past partition end, no ORDER BY) From: Tatsuo Ishii In-Reply-To: <20261104.164415.1303787863463904189.ishii@postgresql.org> References: <20261024.165148.796213861837098561.ishii@postgresql.org> <20261104.164415.1303787863463904189.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:d5e0:e8c:3d54:49b7 (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Shihao, Fixing typo in the previous message... >> Hi Bhuvan, >> >> Thanks for the report and the patch. I can reproduce all five queries >> on master and on 19rc1. >> >> This came in with 25a30bbd423. I think it belongs on the 19 open items. >> >> https://wiki.postgresql.org/wiki/PostgreSQL_19_Open_Items > > Yeah, I have just added this to the 19 open items. > >> With your patch all five return at once and the regression tests >> pass. I also compared the three functions against array_agg(x) FILTER >> (WHERE x IS NOT NULL) over about 11k frame combinations. That included >> spill to disk and volatile arguments. No differences. >> >> One suggestion for the test. Could you add last_value IGNORE NULLS >> with EXCLUDE TIES and no ORDER BY? It scans backward, so it would >> catch a later fix in row_is_in_frame that returns -1 for every >> position after the current row. > > I have just started to read the discussion and patches. Just to > clarify, is the test for feature improvement of row_is_in_frame? ~~~~~~~future Regards, -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp