Add more tests for hashing and hash-based plans
Peter Eisentraut <peter@eisentraut.org>
Add more tests for hashing and hash-based plans - Test hashing of an array of a non-hashable element type. - Test UNION [DISTINCT] with hash- and sort-based plans. (Previously, only INTERSECT and EXCEPT where tested there.) - Test UNION [DISTINCT] with a non-hashable column type. This currently reverts to a sort-based plan even if enable_hashagg is on. - Test UNION/INTERSECT/EXCEPT hash- and sort-based plans with arrays as column types. Also test an array with a non-hashable element type. - Test UNION/INTERSECT/EXCEPT similarly with row types as column types. Currently, this uses only sort-based plans because there is no hashing support for row types. - Add a test case that shows that recursive queries using UNION [DISTINCT] require hashable column types. - Add a currently failing test that uses UNION DISTINCT in a cycle-detection use case using row types as column types. Discussion: https://www.postgresql.org/message-id/flat/38eccd35-4e2d-6767-1b3c-dada1eac3124%402ndquadrant.com
Files
| Path | Change | +/− |
|---|---|---|
| src/test/regress/expected/hash_func.out | modified | +7 −0 |
| src/test/regress/expected/union.out | modified | +356 −1 |
| src/test/regress/expected/with.out | modified | +20 −0 |
| src/test/regress/sql/hash_func.sql | modified | +6 −0 |
| src/test/regress/sql/union.sql | modified | +91 −1 |
| src/test/regress/sql/with.sql | modified | +18 −0 |
Discussion
- Hash support for row types 10 messages · 2020-10-19 → 2020-11-19