| 1608 | } |
| 1609 | |
| 1610 | bool |
| 1611 | gpdb::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 | |
| 1639 | bool |
| 1640 | gpdb::IsOpMergeJoinable(Oid opno, Oid inputtype) |
nothing calls this directly
no test coverage detected