Commit Graph

3058 Commits (38ac28b4b861b79eea93479948bc36610f6547cc)

Author SHA1 Message Date
Marco Slot 486c620a3c Fix inserts into local tables with distributed subqueries 2019-12-10 10:17:18 +01:00
Önder Kalacı f027e9dd77
Improve Recursive CTE tests (#3274)
Postgres keeps track of recursive CTEs in the queryTree in two ways:

   - queryTree->hasRecursive is set to true, whenever a RECURSIVE CTE
     is used in the SQL. Citus checks for it
   - If the CTE is actually a recursive one (a.k.a., references itself)
     Postgres marks CommonTableExpr->cterecursive as true as well

The tests that are changed in the PR doesn't cover (b), and this becomes
an issue with CTE inlining (#3161). In that case, Citus/Postgres can inline
such CTEs, and the queries works with Citus.

However, this tests intend to check if there is any recursive CTE in the queryTree.
So, we're actually making the CTEs recursive CTEs by referring itself.

We'll add cases where a recursive CTE works by inlining in #3161.
2019-12-10 09:38:45 +01:00
Philip Dubé 768912e82b
Merge pull request #2907 from citusdata/test_non_deterministic_collation
pg_dist_colocation: distributioncolumncollation
2019-12-09 20:25:01 +00:00
Philip Dubé fcf2fd819b Add distributioncolumncollation to to pg_dist_colocation
Use partition column's collation for range distributed tables
Don't allow non deterministic collations for hash distributed tables
CoPartitionedTables: don't compare unequal types
2019-12-09 19:51:40 +00:00
SaitTalhaNisanci 91f8be76e1
Add a script that fixes style related things (#3234)
* Add a script that fixes style related things

It is kind of tedious that we need make sure that every style check
passes with any change we make. A script is added, which does all the
things for us so that we dont have to run separate commands.

* run fix style string in reindent target
2019-12-09 14:23:53 +03:00
Philip Dubé 10f2d7c078
Merge pull request #3196 from citusdata/propagate_create_collation
Propagate collations
2019-12-09 04:48:19 +00:00
Philip Dubé d138bb89bf Support creating collations as part of dependency resolution. Propagate ALTER/DROP on distributed collations
Propagate CREATE COLLATION when outside transaction
2019-12-09 04:42:51 +00:00
Jelte Fennema 6340fc1171
Fix editorconfig syntax (#3272)
The comma needs to be contained in curly braces otherwise it does not work
2019-12-06 17:05:04 +01:00
Alexander Pyhalov 6174a4d3d6 Fix build on illumos 2019-12-06 14:40:47 +01:00
Marco Slot b0ac70f1f4
Fix strange errors in DML with unreachable sublinks (#3263)
Fix strange errors in DML with unreachable sublinks
2019-12-06 14:40:28 +01:00
Marco Slot 6a9c0ea7fe Fix errors in DML with sublinks hidden by null expressions 2019-12-06 14:25:04 +01:00
Hadi Moshayedi 9c254859bf
Merge pull request #3257 from citusdata/fix_sql_udf_calls
Detect SQL UDF Calls.
2019-12-05 14:40:00 -08:00
Hadi Moshayedi d28beb3711 Detect SQL UDF Calls. 2019-12-05 14:31:05 -08:00
Philip Dubé 9463509e4a
Merge pull request #3220 from citusdata/test-coordinator-coherence
Test coordinator coherence
2019-12-03 22:34:36 +00:00
Philip Dubé 5a17fd6d9d Test more reference/local cases, also ALTER ROLE
Test ALTER ROLE doesn't deadlock when coordinator added, or propagate from mx workers

Consolidate wait_until_metadata_sync & verify_metadata to multi_test_helpers
2019-12-03 22:23:14 +00:00
Philip Dubé 3433fd0068
Merge pull request #3249 from citusdata/aggregation-directives
aggregate_support test: test DISTINCT, ORDER BY, FILTER, & no intermediate results
2019-12-03 15:56:09 +00:00
Philip Dubé 1597fbb369 aggregate_support test: test DISTINCT, ORDER BY, FILTER, & no intermediate results
Previously,
- we'd push down ORDER BY, but this doesn't order intermediate results between workers
- we'd keep FILTER on master aggregate, which would raise an error about unexpected cstrings
2019-12-03 15:46:01 +00:00
Philip Dubé ffacefc2ad
Merge pull request #3258 from citusdata/more-depended
Stray depended to dependent tidy up
2019-12-03 15:36:37 +00:00
Philip Dubé 5fcc169a3a Stray depended to dependent tidy up 2019-12-03 15:28:32 +00:00
Marco Slot 0b71697d88
Fix segfault in column_to_column_name (#3260)
Fix segfault in column_to_column_name
2019-12-03 14:30:40 +01:00
Marco Slot 33f3fa0eb9
Fix segfault when executing DDL via UDF (#3259)
Fix segfault when executing DDL via UDF
2019-12-03 14:06:55 +01:00
Marco Slot bb3bc10f0c Fix segfault in column_to_column_name 2019-12-01 23:57:25 +01:00
Marco Slot b1b13e394e Fix segfault when executing DDL via UDF 2019-12-01 22:54:41 +01:00
Marco Slot 5957d731ec
Merge pull request #3248 from citusdata/bump92
Bump repo version to 9.2devel
2019-12-01 22:20:14 +01:00
Nils Dijk 1ef1667ddb
add gitref to the output of citus_version (#3246)
DESCRIPTION: add gitref to the output of citus_version

During debugging of custom builds it is hard to know the exact version of the citus build you are using. This patch will add a human readable/understandable git reference to the build of citus which can be retrieved by calling `citus_version();`.
2019-11-29 15:54:09 +01:00
Marco Slot cb7105d1dd
Remove distinction between SQL_TASK and ROUTER_TASK (#3243)
Remove distinction between SQL_TASK and ROUTER_TASK
2019-11-29 14:54:50 +01:00
Marco Slot 4c8d43c5d0 Bump repo version to 9.2devel 2019-11-29 07:33:39 +01:00
Marco Slot 16d1ad3666 Remove distinction between SQL_TASK and ROUTER_TASK 2019-11-29 05:58:29 +01:00
SaitTalhaNisanci aeec3d1544
fix typo in dependent jobs and dependent task (#3244) 2019-11-28 23:47:28 +03:00
Onur TIRTIR ec9392e729
Update CHANGELOG.md (#3241) 2019-11-28 16:13:58 +03:00
Philip Dubé dd5570810e
Merge pull request #3237 from citusdata/support-more-record-expressions
RECORD: Add support for more expression types
2019-11-27 17:58:37 +00:00
Philip Dubé 0d04ff1692 RECORD: Add support for more expression types
- OpExpr
- NullIfExpr
- MinMaxExpr
- CoalesceExpr
- CaseExpr

Also fix case where ARRAY[(1,2), NULL] was rejected
2019-11-27 17:07:22 +00:00
Philip Dubé 6d14f63f81
Merge pull request #3211 from citusdata/support-recordarray
Implement support for RECORD[] where we support RECORD
2019-11-27 15:27:13 +00:00
Philip Dubé 168e11cc9b Implement support for RECORD[] where we support RECORD
Support for ARRAY[] expressions is limited to having a consistent shape,
eg ARRAY[(int,text),(int,text)] as opposed to ARRAY[(int,text),(float,text)] or ARRAY[(int,text),(int,text,float)]
2019-11-27 15:02:43 +00:00
Hadi Moshayedi 2268a9cae6 Error for metadata commands if any metadata node is out-of-sync (#3226)
* Error for metadata commands if any metadata node is out-of-sync

* Make the functions have separate APIs for all workers/metadata workers
2019-11-27 09:52:57 +01:00
Marco Slot 2329157406 Swap aggregate_support tests to simplify enterprise merge 2019-11-26 13:39:18 +01:00
Önder Kalacı 1cfbeb89ec
Make NodeCanHaveDistTablePlacements() public (#3229)
Since it is required in rebalancer.
2019-11-26 12:15:38 +01:00
Marco Slot 60b741927f Add missing include to deparse_function_stmts.c 2019-11-24 06:04:22 +01:00
Hadi Moshayedi 5a9d5d213a
Merge pull request #3227 from citusdata/nnig
Fix typos
2019-11-25 16:46:10 -08:00
Philip Dubé 261a9de42d Fix typos:
VAR_SET_VALUE_KIND -> VAR_SET_VALUE kind
beginnig -> beginning
plannig -> planning
the the -> the
er then -> er than
2019-11-25 23:24:13 +00:00
Marco Slot 4b0ac4b0dd Properly escape ALTER FUNCTION .. SET deparsing. Also test 2019-11-25 23:01:30 +00:00
Philip Dubé 3c10c27b13 GetFunctionAlterOwnerCommand: use format_procedure_qualified
distributed_functions: test a function with a quote in name
AppendDefElemSet: quote variable names
2019-11-25 23:01:30 +00:00
Philip Dubé a81e6a81ab Fix distributed aggregation for non superuser roles
Moves support functions to pg_catalog for now. We'd prefer a different solution
for when we're creating these support functions dynamically
2019-11-25 20:46:25 +00:00
Khashayar Fereidani f81785ad14 Fix underflow initialization of default values
Initialization of queryWindowClause and queryOrderByLimit "memset" underflow these variables.
It's possible due to the invalid usage sizeof this part of the program cause buffer overflow and function return data corruption in future changes.
2019-11-25 19:25:51 +00:00
Onur TIRTIR bef32624c3
Escape extension name in extension command propagation (#3218) 2019-11-24 12:16:10 +03:00
Philip Dubé 99164398bf Fix potential segfault from standard_planner inlining functions 2019-11-21 18:47:36 +00:00
Philip Dubé c563e0825c Strip trailing whitespace and add final newline (#3186)
This brings files in line with our editorconfig file
2019-11-21 14:25:37 +01:00
Jelte Fennema 1d8dde232f
Automatically convert useless declarations using regex replace (#3181)
* Add declaration removal to CI

* Convert declarations
2019-11-21 13:47:29 +01:00
Onur TIRTIR 9961297d7b Improve extension command propagation logic and tests
* Improve extension command propagation tests

* patch for hardcoded citus extension name

(cherry picked from commit 0bb3dbac0afabda10e8928f9c17eda048dc4361a)
2019-11-21 11:24:39 +03:00
Marco Slot 7d2813f799 Update .codecov.yml after moving ruleutils files 2019-11-16 14:25:35 +01:00