Summary:
yb_hash_code() can be used as an index key if it is in a row constructor with an inequality, e.g.
row(j, yb_hash_code(i)) > row(1, 2)
The current code only handles the equality case correctly and this fix addresses the inequality cases.
Also, yb_hash_code() cannot be used as an index key if it is under a SAOP expression. This fix
prevents such SAOP expressions from being considered as index clauses.
Jira: DB-7335
Test Plan:
./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressProc'
./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressDml'
Reviewers: mihnea, tnayak
Reviewed By: tnayak
Subscribers: mihnea, yql
Differential Revision: https://phorge.dev.yugabyte.com/D40034