Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix system procedure sp_pkeys which may fail to return any row if par…
…allel mode is enforced (#2147) It is Postgres peculiarity with Hash cond (with operator text = name and text = name) that hash functions being used to hash text and name data type values are totally different, for example, hashtext would consider explicit collation whereas hashname does not care about explicit collation. That is the reason why hash condition would fail every time. (hashtext and hashname may produce different hash value for same input under collation other than "C"). This means that whenever there is such hash condition for Hash join then it would always fail and will not return any row. And optimiser can choose such hash join based on stats. Such issue is observed with helper view sys.sp_pkeys_view which is being used by system procedure sp_pkeys causing procedure to return zero rows when optimiser chooses certain hash join. This commit fixes such issue by casting name data type to appropriate T-SQL data type. Task: BABEL-4603 Signed-off-by: Dipesh Dhameliya [email protected]
- Loading branch information