Remove unused field from SubPlanState struct
authorDavid Rowley <[email protected]>
Thu, 31 Oct 2024 00:44:15 +0000 (13:44 +1300)
committerDavid Rowley <[email protected]>
Thu, 31 Oct 2024 00:44:15 +0000 (13:44 +1300)
bf6c614a2 did some conversion work to use ExprState instead of manually
calling equality functions to check if one set of values is not distinct
from another set.  That patch removed many of the fields that became
redundant as a result of that change, but it forgot to remove
SubPlanState.tab_eq_funcs.  Fix that.

In passing, fix the header comment for TupleHashEntryData to correctly
spell the field name it's talking about.

Author: Rafia Sabih <[email protected]>
Reviewed-by: Andrei Lepikhov <[email protected]>
Discussion: https://postgr.es/m/CA+FpmFeycdombFzrjZw7Rmc29CVm4OOzCWwu=dVBQ6q=PX8SvQ@mail.gmail.com
Discussion: https://postgr.es/m/CAApHDvrWR2jYVhec=COyF2g2BE_ns91NDsCHAMFiXbyhEujKdQ@mail.gmail.com

src/backend/executor/nodeSubplan.c
src/include/nodes/execnodes.h

index a96cdd01e1b5e000fe0cd5b778aa5138106d35b1..236222d72a1eb2560604b56982478b994a910c23 100644 (file)
@@ -856,7 +856,6 @@ ExecInitSubPlan(SubPlan *subplan, PlanState *parent)
    sstate->keyColIdx = NULL;
    sstate->tab_eq_funcoids = NULL;
    sstate->tab_hash_funcs = NULL;
-   sstate->tab_eq_funcs = NULL;
    sstate->tab_collations = NULL;
    sstate->lhs_hash_funcs = NULL;
    sstate->cur_eq_funcs = NULL;
@@ -954,7 +953,6 @@ ExecInitSubPlan(SubPlan *subplan, PlanState *parent)
        sstate->tab_eq_funcoids = (Oid *) palloc(ncols * sizeof(Oid));
        sstate->tab_collations = (Oid *) palloc(ncols * sizeof(Oid));
        sstate->tab_hash_funcs = (FmgrInfo *) palloc(ncols * sizeof(FmgrInfo));
-       sstate->tab_eq_funcs = (FmgrInfo *) palloc(ncols * sizeof(FmgrInfo));
        sstate->lhs_hash_funcs = (FmgrInfo *) palloc(ncols * sizeof(FmgrInfo));
        sstate->cur_eq_funcs = (FmgrInfo *) palloc(ncols * sizeof(FmgrInfo));
        /* we'll need the cross-type equality fns below, but not in sstate */
@@ -999,8 +997,6 @@ ExecInitSubPlan(SubPlan *subplan, PlanState *parent)
                elog(ERROR, "could not find compatible hash operator for operator %u",
                     opexpr->opno);
            sstate->tab_eq_funcoids[i - 1] = get_opcode(rhs_eq_oper);
-           fmgr_info(sstate->tab_eq_funcoids[i - 1],
-                     &sstate->tab_eq_funcs[i - 1]);
 
            /* Lookup the associated hash functions */
            if (!get_op_hash_functions(opexpr->opno,
index b67d5186a2d2a5eb88b908b9e6aaac8dfb81deb0..182a6956bb0dee7d786f607af150a4554d83e84c 100644 (file)
@@ -796,7 +796,7 @@ typedef struct ExecAuxRowMark
  * All-in-memory tuple hash tables are used for a number of purposes.
  *
  * Note: tab_hash_funcs are for the key datatype(s) stored in the table,
- * and tab_eq_funcs are non-cross-type equality operators for those types.
+ * and tab_eq_func are non-cross-type equality operators for those types.
  * Normally these are the only functions used, but FindTupleHashEntry()
  * supports searching a hashtable using cross-data-type hashing.  For that,
  * the caller must supply hash functions for the LHS datatype as well as
@@ -994,7 +994,6 @@ typedef struct SubPlanState
                                     * datatype(s) */
    Oid        *tab_collations; /* collations for hash and comparison */
    FmgrInfo   *tab_hash_funcs; /* hash functions for table datatype(s) */
-   FmgrInfo   *tab_eq_funcs;   /* equality functions for table datatype(s) */
    FmgrInfo   *lhs_hash_funcs; /* hash functions for lefthand datatype(s) */
    FmgrInfo   *cur_eq_funcs;   /* equality functions for LHS vs. table */
    ExprState  *cur_eq_comp;    /* equality comparator for LHS vs. table */