mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-17 19:13:16 +08:00
Tests for queries on distributed hypertables are now consolidated in the `dist_query` test. Not only does this test provide more consistent EXPLAIN output, but it also runs all queries against different types of tables holding the same data, including comparing the result output with `diff`. The different types of tables compared are: - Regular table (for reference) - One-dimensional distributed hypertabe - Two-dimensional distributed hypertabe (which is partially repartitioned) EXPLAINs are provided on the two-dimensional table showing the effect on plans when quering repartitioned time ranges. In most case, FULL push-down is not possible in such cases. In addition to test refactoring, this change includes a fix for handling `HAVING` clauses in remote partialized queries. Such clauses should not be sent to the remote end in case of partial queries since any aggregates in the `HAVING` clause must be returned in the result target list. Fortunately, modification of the target list is already taken care of by the main planner.