Merge pull request #441 from citusdata/add_hash_op_comment

Add clarifying comment in HashableClauseMutator

cr: @marcocitus
pull/450/head
Jason Petersen 2016-04-19 12:29:45 -06:00
commit cb7a397b0c
1 changed files with 7 additions and 0 deletions

View File

@ -2858,6 +2858,13 @@ HashableClauseMutator(Node *originalNode, Var *partitionColumn)
Oid leftHashFunction = InvalidOid;
Oid rightHashFunction = InvalidOid;
/*
* If operatorExpression->opno is NOT the registered '=' operator for
* any hash opfamilies, then get_op_hash_functions will return false.
* This means this function both ensures a hash function exists for the
* types in question AND filters out any clauses lacking equality ops.
*/
bool hasHashFunction = get_op_hash_functions(operatorExpression->opno,
&leftHashFunction,
&rightHashFunction);