Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oIxcM-0007UY-MA for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Aug 2022 19:31:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oIxcL-00011m-HC for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Aug 2022 19:31:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oIxcL-00011d-6K for pgsql-hackers@lists.postgresql.org; Tue, 02 Aug 2022 19:31:49 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oIxcJ-0003gw-A7 for pgsql-hackers@lists.postgresql.org; Tue, 02 Aug 2022 19:31:48 +0000 Received: by mail-lf1-x130.google.com with SMTP id z25so23411326lfr.2 for ; Tue, 02 Aug 2022 12:31:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yugabyte.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=0wp1vu5GN8HKC6m/0jLC7hKdyIUo+5I32EVmnxisPXg=; b=ZesFNTSfTr2kYpmyMUl08NvlNw5L4Ugc2jx9WZCQl6QexDTXnqe9kt++awbT2IT+BL 2ra7/dqilbg7ueDWXz2qlZmd1XHJ4OOA/6UMv/GYGULYdGdgoIf0TROkyHDgZNTYMr07 u5IzqlKtNVpgBHod20zvm80FrueoWdysutUYk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=0wp1vu5GN8HKC6m/0jLC7hKdyIUo+5I32EVmnxisPXg=; b=RMiW7u9RgRuxEhvpJDtC9NjQ17IO1+AD1va40uby/qtptkxdr+p3Y9Zpd/YOD8HP4+ 6n9MTtOieESVSKlYg5ffu0hICVgoYZcZPMhFg4LZn8yy5eMaWGdGph0155q02YxWvigF BU1newgek4F73/2txAcrRWJHHaazLdWE9o+tpU8ssAl0ZwjDLY4k0Vt3lZKiZrO+lgpf lSLPMAoZMdZGHisvdwxV65tW7kcJG+pAx3mC1fVNGtvtQuyPcWBy3cuKkyResLSHphfP brK1gLG3W5WzIkRPsv3B6prs7xqLQcz0L5qyjL606rUMjc1DqdB9PosWiWrnRXs2ZsON O6BQ== X-Gm-Message-State: ACgBeo225OhQipIMALOzy32qY13JJonSfneYa0mjN/FoN/WBE0bGIHoC 4Hbw2pMNbVFbuW44G6HKt9bi37TZMV0hDBa5H0Mu6w== X-Google-Smtp-Source: AA6agR6qUIaeHRLPWBtRyOCt6Vysntp4IEgdshRwtWNlwgLPkRfdvpWnkdxH379nkFDfnDH+jaiIE+szynXdduwHYMk= X-Received: by 2002:a05:6512:2828:b0:48a:f624:28b0 with SMTP id cf40-20020a056512282800b0048af62428b0mr4136926lfb.29.1659468706625; Tue, 02 Aug 2022 12:31:46 -0700 (PDT) MIME-Version: 1.0 References: <4493999.1py09z8qHF@aivenronan> <3163474.aeNJFYEL58@aivenronan> <1138716.1659282591@sss.pgh.pa.us> In-Reply-To: From: Zhihong Yu Date: Tue, 2 Aug 2022 12:38:22 -0700 Message-ID: Subject: Re: Add proper planner support for ORDER BY / DISTINCT aggregates To: Tom Lane Cc: David Rowley , Richard Guo , Ronan Dunklau , PostgreSQL Developers , Ranier Vilela Content-Type: multipart/mixed; boundary="000000000000c6af5f05e5472a3e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000c6af5f05e5472a3e Content-Type: multipart/alternative; boundary="000000000000c6af5c05e5472a3c" --000000000000c6af5c05e5472a3c Content-Type: text/plain; charset="UTF-8" On Tue, Aug 2, 2022 at 11:02 AM Zhihong Yu wrote: > >> Hi, David: > > I was looking at the final patch and noticed that setno field > in agg_presorted_distinctcheck struct is never used. > > Looks like it was copied from neighboring struct. > > Can you take a look at the patch ? > > Thanks > >> > > Looks like setoff field is not used either. Cheers --000000000000c6af5c05e5472a3c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Aug 2, 2022 at 11:02 AM Zhiho= ng Yu <zyu@yugabyte.com> wrot= e:

Hi, David:
I was looking at the final patch and = noticed that setno field in=C2=A0agg_presorted_distinctcheck struct is neve= r used.

Looks like it was copied from neighboring = struct.

Can you take a look at the patch ?

Thanks=C2=A0
=C2=A0
Looks like seto= ff field is not used either.

Cheers=C2=A0
--000000000000c6af5c05e5472a3c-- --000000000000c6af5f05e5472a3e Content-Type: application/octet-stream; name="drop-setno-setoff-from-agg_presorted_distinctcheck.patch" Content-Disposition: attachment; filename="drop-setno-setoff-from-agg_presorted_distinctcheck.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l6cl1l0n0 ZGlmZiAtLWdpdCBhL3NyYy9pbmNsdWRlL2V4ZWN1dG9yL2V4ZWNFeHByLmggYi9zcmMvaW5jbHVk ZS9leGVjdXRvci9leGVjRXhwci5oCmluZGV4IDA3MzliMzg5ZjMuLmMxM2RmNzRkYzQgMTAwNjQ0 Ci0tLSBhL3NyYy9pbmNsdWRlL2V4ZWN1dG9yL2V4ZWNFeHByLmgKKysrIGIvc3JjL2luY2x1ZGUv ZXhlY3V0b3IvZXhlY0V4cHIuaApAQCAtNjY2LDkgKzY2Niw3IEBAIHR5cGVkZWYgc3RydWN0IEV4 cHJFdmFsU3RlcAogCQl7CiAJCQlBZ2dTdGF0ZVBlclRyYW5zIHBlcnRyYW5zOwogCQkJRXhwckNv bnRleHQgKmFnZ2NvbnRleHQ7Ci0JCQlpbnQJCQlzZXRubzsKIAkJCWludAkJCXRyYW5zbm87Ci0J CQlpbnQJCQlzZXRvZmY7CiAJCQlpbnQJCQlqdW1wZGlzdGluY3Q7CiAJCX0JCQlhZ2dfcHJlc29y dGVkX2Rpc3RpbmN0Y2hlY2s7CiAK --000000000000c6af5f05e5472a3e--