* execTuplesMatchPrepare * Build expression that can be evaluated using ExecQual(), returning * whether an ExprContext's inner/outer tuples are NOT DISTINCT */
| 58 | * whether an ExprContext's inner/outer tuples are NOT DISTINCT |
| 59 | */ |
| 60 | ExprState * |
| 61 | execTuplesMatchPrepare(TupleDesc desc, |
| 62 | int numCols, |
| 63 | const AttrNumber *keyColIdx, |
| 64 | const Oid *eqOperators, |
| 65 | const Oid *collations, |
| 66 | PlanState *parent) |
| 67 | { |
| 68 | Oid *eqFunctions = (Oid *) palloc(numCols * sizeof(Oid)); |
| 69 | int i; |
| 70 | ExprState *expr; |
| 71 | |
| 72 | if (numCols == 0) |
| 73 | return NULL; |
| 74 | |
| 75 | /* lookup equality functions */ |
| 76 | for (i = 0; i < numCols; i++) |
| 77 | eqFunctions[i] = get_opcode(eqOperators[i]); |
| 78 | |
| 79 | /* build actual expression */ |
| 80 | expr = ExecBuildGroupingEqual(desc, desc, NULL, NULL, |
| 81 | numCols, keyColIdx, eqFunctions, collations, |
| 82 | parent); |
| 83 | |
| 84 | return expr; |
| 85 | } |
| 86 | |
| 87 | /* |
| 88 | * execTuplesHashPrepare |
no test coverage detected