On Fri, Oct 9, 2020 at 6:41 PM Ranier Vilela <ranier...@gmail.com> wrote:
> The problem is not only in nodeIncrementalSort.c, but in several others > too, where people are using TupIsNull with ExecCopySlot. > I would call this a design flaw. > If (TupIsNull) > ExecCopySlot > > The callers, think they are using TupIsNotNullAndEmpty. > If (TupIsNotNullAndEmpty) > ExecCopySlot > IMO both names are problematic, too data value centric, not semantic. TupIsValid for the name and negating the existing tests would help to at least clear that part up. Then, things operating on invalid tuples would be expected to know about both representations. In the case of ExecCopySlot there is nothing it can do with a null representation of an invalid tuple so it would have to fail if presented one. An assertion seems sufficient. David J.