Re: Redundant code in create_gather_merge_path

2024-07-22 Thread Richard Guo
On Thu, Jul 18, 2024 at 11:08 AM Richard Guo wrote: > On Thu, Jul 18, 2024 at 10:02 AM Richard Guo wrote: > > I noticed this while reviewing patch [1], thinking that it might be > > worth fixing. Any thoughts? > > Here is the patch. This patch is quite straightforward to remove the redundant co

Re: Redundant code in create_gather_merge_path

2024-07-17 Thread Richard Guo
On Thu, Jul 18, 2024 at 10:02 AM Richard Guo wrote: > I noticed this while reviewing patch [1], thinking that it might be > worth fixing. Any thoughts? Here is the patch. Thanks Richard v1-0001-Remove-redundant-code-in-create_gather_merge_path.patch Description: Binary data

Redundant code in create_gather_merge_path

2024-07-17 Thread Richard Guo
In create_gather_merge_path, we should always guarantee that the subpath is adequately ordered, and we do not add a Sort node in createplan.c for a Gather Merge node. Therefore, the 'else' branch in the snippet from create_gather_merge_path is redundant. if (pathkeys_contained_in(pathkeys, su