MCPcopy Create free account
hub / github.com/apache/cloudberry / IsOpHashJoinable

Method IsOpHashJoinable

src/backend/gpopt/gpdbwrappers.cpp:1610–1637  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1608}
1609
1610bool
1611gpdb::IsOpHashJoinable(Oid opno, Oid inputtype)
1612{
1613 GP_WRAP_START;
1614 {
1615 /* catalog tables: pg_operator */
1616 if (!op_hashjoinable(opno, inputtype))
1617 return false;
1618
1619 /*
1620 * Even if oprcanhash is true, we need to verify that hash functions
1621 * actually exist for this operator. This is because oprcanhash can be
1622 * set to true while the operator is only registered in a btree opfamily
1623 * and not in a hash opfamily, which would cause execution-time errors
1624 * when trying to build hash tables.
1625 *
1626 * See get_op_hash_functions() in lsyscache.c which requires operators
1627 * to be registered in a hash opfamily (amopmethod == HASH_AM_OID).
1628 */
1629 RegProcedure hash_proc;
1630 if (!get_op_hash_functions(opno, &hash_proc, NULL))
1631 return false;
1632
1633 return true;
1634 }
1635 GP_WRAP_END;
1636 return false;
1637}
1638
1639bool
1640gpdb::IsOpMergeJoinable(Oid opno, Oid inputtype)

Callers

nothing calls this directly

Calls 2

op_hashjoinableFunction · 0.85
get_op_hash_functionsFunction · 0.85

Tested by

no test coverage detected