Commit Graph

1745 Commits (release-7.3)

Author SHA1 Message Date
velioglu 0eefb07987 Adds missing changelog items for the 7.3 2018-03-16 10:06:50 +03:00
velioglu f1955cea63 Bump Citus version to 7.3.0 2018-03-15 13:59:08 +03:00
Burak Velioglu 991000efc9
Merge pull request #2055 from citusdata/citus-7.3.0-changelog-1521010978
Bump citus to 7.3.0
2018-03-15 13:49:43 +03:00
velioglu cbe7799863 Add changelog entry for 7.3.0 2018-03-15 10:58:36 +03:00
Metin Döşlü 81cbb7c223
Merge pull request #2051 from citusdata/remove_skip_jsonb_validation_in_copy
Remove skip_jsonb_validation_in_copy GUC
2018-03-13 18:38:43 +03:00
Metin Doslu 3b7b64a8b6 Remove skip_jsonb_validation_in_copy GUC 2018-03-13 10:33:27 +02:00
Murat Tuncer 1440caeef2
Fix incorrect limit pushdown when distinct clause is not superset of group by (#2035)
Pushing down limit and order by into workers may produce
wrong output when distinct on() clause has expressions,
aggregates, or window functions.

This checking allows pushing down of limits only if
distinct clause is a superset of group by clause. i.e. it contains all clauses in group by.
2018-03-07 13:24:56 +03:00
Metin Döşlü 27d159d6f6
Merge pull request #2041 from citusdata/make_skip_jsonb_validation_in_copy_off
Change default to false for citus.skip_jsonb_validation_in_copy
2018-03-06 14:43:58 +03:00
Metin Doslu e86d34256c Change default to false for citus.skip_jsonb_validation_in_copy 2018-03-06 13:19:47 +02:00
Önder Kalacı 1d2a2d13cb
Merge pull request #2038 from citusdata/fix_modify_subquery
Improve error messages for INSERT queries that have subqueries
2018-03-05 16:49:53 +03:00
Onder Kalaci 40b898b59f Improve error messages for INSERT queries that have subqueries 2018-03-05 14:46:47 +02:00
Önder Kalacı e7b28dd469
Merge pull request #2031 from citusdata/fix_immediate_shut_down_issue
Improve error handling on failures
2018-03-02 10:04:12 +03:00
Onder Kalaci 7dc9589b56 Handle failures during I/O
This commit checks the connection status right after any IO happens
on the socket.

This is necessary since before this commit we didn't pass any information
to the higher level functions whether we're done with the connection
(e.g., no IO required anymore) or an errors happened during the IO.
2018-03-02 08:33:53 +02:00
Onder Kalaci da0048e0b7 ForgetResults() becomes a wrapper for ClearResults()
ClearResults() is able to handle failures properly by
checking the result status. So, relying on it makes
error handling more generic in Citus.
2018-03-02 08:33:53 +02:00
Murat Tuncer 76f6883d5d
Add support for window functions that can be pushed down to worker (#2008)
This is the first of series of window function work.

We can now support window functions that can be pushed down to workers.
Window function must have distribution column in the partition clause
 to be pushed down.
2018-03-01 19:07:07 +03:00
Marco Slot 8e2c72c054
Merge pull request #2030 from citusdata/bool_agg
Add support for bool and bit aggregates
2018-02-28 13:08:35 +01:00
Murat Tuncer e13c5beced
Fix worker query when order by avg aggregate is used (#2024)
We push down order by to worker query when limit is specified
(with some other additional checks). If the query has an expression
on an aggregate or avg aggregate by itself, and there is an order
by on this particular target we may send wrong order by to worker
query with potential to affect query result.

The fix creates a auxilary target entry in the worker query and
uses that target entry for sorting.
2018-02-28 12:12:54 +03:00
Marco Slot dc7213a11c Use expressions in the ORDER BY in bool_agg 2018-02-27 23:52:44 +01:00
Marco Slot e79db17b91 Update comment in WorkerAggregateExpressionList 2018-02-27 23:48:25 +01:00
Marco Slot ef5ff7eb12 Add bit_ and bool_ aggregates to AggregateType 2018-02-27 23:48:25 +01:00
Marco Slot c723a1fa32 Add support for bool and bit aggregates 2018-02-27 23:48:25 +01:00
Metin Döşlü 8516d8631e
Merge pull request #2006 from citusdata/modifiying_cte
Add support for modifying CTEs
2018-02-27 16:26:58 +03:00
Metin Doslu bcf660475a Add support for modifying CTEs 2018-02-27 15:08:32 +02:00
Marco Slot 3098a15164
Merge pull request #2028 from citusdata/fix_regressions
Fix regression for changes on REL_10_STABLE
2018-02-27 14:01:55 +01:00
Metin Doslu 91165c4140 Add a temporary file to pass Travis tests 2018-02-27 13:50:36 +02:00
Metin Doslu 53bb0b6aee Fix regression for changes on REL_10_STABLE 2018-02-27 12:52:56 +02:00
Burak Velioglu ee67ce892f
Merge pull request #2018 from citusdata/distinct_without_groupby_column
Add distinct plan after aggregation plan on master planner
2018-02-26 15:51:19 +03:00
velioglu 78e6d990a2 Fix master plan of the query with distinct, aggregate and group by clauses.
Before this PR, we were trusting on the columns of group by about
guaranteeing the uniqueness of the results. However, this assumption
is correct only if the columns in the group by is subset of columns
in the distinct clause. It can be wrong if we have part of group by
columns and some aggregation columns in the distinct clause. With
this PR, we add distinct plan on top of aggregate plan when necessary.
2018-02-26 15:30:15 +03:00
Önder Kalacı 059644c1ab
Merge pull request #2016 from citusdata/non_colocated_subqueries
Support non-co-located joins between subqueries
2018-02-26 15:25:04 +03:00
Onder Kalaci 1c930c96a3 Support non-co-located joins between subqueries
With #1804 (and related PRs), Citus gained the ability to
plan subqueries that are not safe to pushdown.

There are two high-level requirements for pushing down subqueries:

   * Individual subqueries that require a merge step (i.e., GROUP BY
     on non-distribution key, or LIMIT in the subquery etc). We've
     handled such subqueries via #1876.

    * Combination of subqueries that are not joined on distribution keys.
      This commit aims to recursively plan some of such subqueries to make
      the whole query safe to pushdown.

The main logic behind non colocated subquery joins is that we pick
an anchor range table entry and check for distribution key equality
of any  other subqueries in the given query. If for a given subquery,
we cannot find distribution key equality with the anchor rte, we
recursively plan that subquery.

We also used a hacky solution for picking relations as the anchor range
table entries. The hack is that we wrap them into a subquery. This is only
necessary since some of the attribute equivalance checks are based on
queries rather than range table entries.
2018-02-26 13:50:37 +02:00
Onder Kalaci 7b57e0562a Add infrastructure for detecting non-colocated subqueries 2018-02-26 13:28:25 +02:00
Onder Kalaci cdb8d429a7 Add regression tests for non-colocated leaf subqueries 2018-02-26 13:28:24 +02:00
Onder Kalaci 4d4648aabd Change single shard mx test tables to reference tables 2018-02-26 13:28:24 +02:00
Onder Kalaci 4d70c86645 Leaf level recursive planning for non colocated subqueries
With this commit, we enable recursive planning for the subqueries
that are not joined on the distribution keys.
2018-02-26 13:28:24 +02:00
Onder Kalaci e998703ff8 Enable restriction eq. checks for top level set operations
We used to only support pushdownable set operations inside a
subquery, however, we could easily expand the restriction
checks to cover top level set operations as well.
2018-02-26 13:28:24 +02:00
Onder Kalaci e8aa532a90 Refactor checks for distribution key equality
Change some function names, ensure we stick to Citus'
function order rules etc.
2018-02-26 13:28:24 +02:00
Marco Slot 846b8b1536
Merge pull request #2023 from citusdata/fix_table_size
Do not use new connection in table size functions
2018-02-26 11:04:54 +01:00
Marco Slot 1e9186a3b5 Do not use new connection in table size functions 2018-02-23 07:07:55 +01:00
Marco Slot e2001a332f
Merge pull request #2015 from MarkusSintonen/jsonb-aggregation
Add support for json(b) aggregation
2018-02-21 14:44:07 +01:00
Markus Sintonen 6202e80d06 Implemented jsonb_agg, json_agg, jsonb_object_agg, json_object_agg 2018-02-18 00:19:18 +02:00
Önder Kalacı 62237c40a7
Merge pull request #2007 from citusdata/ref_where_sublinks_v2
Recursively plan subqueries in WHERE clause when FROM recurs
2018-02-14 10:32:20 +03:00
velioglu 195ac948d2 Recursively plan subqueries in WHERE clause when FROM recurs 2018-02-13 19:52:12 +03:00
Marco Slot 6ce4795f1c
Merge pull request #1996 from citusdata/cache_worker_node_array
Cache worker node array for faster iteration
2018-02-12 15:26:48 -08:00
Marco Slot 0cba4ab588 Refactor worker node hash initialisation 2018-02-12 23:36:43 +01:00
Marco Slot 40d715d494 Cache worker node array for faster iteration 2018-02-12 23:36:43 +01:00
Marco Slot 65fca44f4f
Merge pull request #1979 from citusdata/fix_abort_errors
Handle errors that are discovered during abort
2018-02-12 10:04:00 -08:00
Marco Slot d9c5c4a8f1
Merge pull request #2003 from citusdata/no_plan_copy
Only copy distributed plan when modifying it
2018-02-12 09:34:30 -08:00
Önder Kalacı bf1e492011
Merge pull request #1989 from citusdata/refactor_restriction_logic
Some code refactoring and performance improvements for restriction equivalences
2018-02-12 20:01:35 +03:00
Onder Kalaci 94c5ac6ebb Remove duplicate join restrictions
We use PostgreSQL hooks to accumulate the join restrictions
and PostgreSQL gives us all the join paths it tries while
deciding on the join order. Thus, for queries that have many
joins, this function is likely to remove lots of duplicate join
restrictions. This becomes relevant for Citus on query pushdown
check peformance.
2018-02-12 18:35:05 +02:00
Onder Kalaci c228d8ff3d Refactor equivalance generation related codes
This commit changes the APIs for restriction generation to make future
changes simpler.
2018-02-12 18:35:04 +02:00