This is an automated backport of #6957: Fix segfault in UNION queries with top-level ordering.
The original issue is #6925.
This PR will be merged automatically after all the relevant CI checks pass. If this fix should not be backported, or will be backported manually, just close this PR. You can use the backport branch to add your changes, it won't be modified automatically anymore.
This is an automated backport of #6957: Fix segfault in UNION queries with top-level ordering. The original issue is #6925. This PR will be merged automatically after all the relevant CI checks pass. If this fix should not be backported, or will be backported manually, just close this PR. You can use the backport branch to add your changes, it won't be modified automatically anymore.
For more details, please see the documentation
Original description
Fix segfault in UNION queries with top-level ordering
We can't just filter the equivalence member based on em_is_child as our hypertable might not be top-level equivalence member.
Fixes
#6925