Re: Wired if-statement in gen_partprune_steps_internal - Mailing list pgsql-hackers

From David Rowley
Subject Re: Wired if-statement in gen_partprune_steps_internal
Date
Msg-id CAApHDvrWOBRzX=D+328=i8ZVOzzHd-O85to1E8e9wgVTuz43Vg@mail.gmail.com
Whole thread Raw
In response to Re: Wired if-statement in gen_partprune_steps_internal  (Amit Langote <amitlangote09@gmail.com>)
Responses Re: Wired if-statement in gen_partprune_steps_internal
List pgsql-hackers
On Thu, 8 Apr 2021 at 21:04, Amit Langote <amitlangote09@gmail.com> wrote:
> + * These partition pruning steps come in 2 forms; operation steps and combine
> + * steps.
>
> Maybe you meant "operator" steps?  IIRC, the reason why we named it
> PartitionPruneStepOp is that an op step is built to prune based on the
> semantics of the operators that were involved in the matched clause.
> Although, they're abused for pruning based on nullness clauses too.
> Maybe, we should also updated the description of node struct as
> follows to consider that last point:

Oh right. Thanks. I fixed that.

>  * PartitionPruneStepOp - Information to prune using a set of mutually ANDed
>  *                          OpExpr and any IS [ NOT ] NULL clauses
>
> + * Combine steps (PartitionPruneStepCombine) instruct the partition pruning
> + * code how it should produce a single set of partitions from multiple input
> + * operation steps.

I didn't add that. I wasn't really sure if I understood why we'd talk
about PartitionPruneStepCombine in the PartitionPruneStepOp. I thought
the overview in gen_partprune_steps_internal was ok to link the two
together and explain why they're both needed.

> I think the last part should be: ...from multiple operation/operator
> and [ other ] combine steps.

Change that and pushed.

David



pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Replication slot stats misgivings
Next
From: David Rowley
Date:
Subject: Re: Binary search in ScalarArrayOpExpr for OR'd constant arrays