Commit Graph

2990 Commits (f90bbc64f696b03026b2f40bd5ee94c75d1d02b6)

Author SHA1 Message Date
Marco Slot f90bbc64f6
Fix a crash when calling a distributed function from PL/pgSQL (#3302)
Fix a crash when calling a distributed function from PL/pgSQL
2019-12-16 19:03:45 +01:00
SaitTalhaNisanci 97bfd0bba0
add circleci build status (#3310) (#3309) 2019-12-16 19:25:32 +03:00
Marco Slot 5f656e22db Fix issue in IsMultiStatementTransaction detection 2019-12-16 17:01:43 +01:00
SaitTalhaNisanci e3db433ec1
add circleci build status (#3310) 2019-12-16 17:46:36 +03:00
SaitTalhaNisanci 2829c601dd
replace Begin words in coordinated transactions with use (#3293) 2019-12-16 10:40:31 +03:00
SaitTalhaNisanci a2f2107e6a
refactor MapTaskList in multi physical planner (#3297) 2019-12-13 22:41:49 +03:00
Marco Slot 3b6b3f8c48
Fix crash in IN (.., NULL) queries (#3299)
Fix crash in IN (.., NULL) queries
2019-12-13 18:49:36 +01:00
Marco Slot 1633123d78 Fix crash in IN (NULL) queries 2019-12-13 08:35:54 +01:00
Hadi Moshayedi 7666d02537
Merge pull request #3294 from citusdata/fix_typos
Fix some typos from #3280
2019-12-12 13:35:38 -08:00
Hadi Moshayedi e7a6cc0801 Fix some typos from #3280 2019-12-12 13:29:26 -08:00
SaitTalhaNisanci 420e21919b
refactor extract distributed insert values rte (#3287) 2019-12-12 23:47:44 +03:00
Marco Slot 7447dfe156
Fix error in DML with NULL expression in where clause (#3262)
Fix error in DML with NULL expression in where clause
2019-12-12 17:25:23 +01:00
SaitTalhaNisanci 2c040d2c8f
use a function for duplicate code in connection state machine (#3209) 2019-12-12 17:55:38 +03:00
SaitTalhaNisanci a0fe8646e0
add IsHoldOffCancellationReceived utility function (#3290) 2019-12-12 17:32:59 +03:00
SaitTalhaNisanci 053fe18404
not continue in sequential execution if a cancellation is received (#3289) 2019-12-12 17:22:30 +03:00
Hadi Moshayedi 0cd14449f3
Merge pull request #3280 from citusdata/fix_drop_column
Fix the way we check for local/reference table joins in the executor
2019-12-12 05:13:36 -08:00
Marco Slot e7a8db5493 Fix issue with some zero-shard modifications 2019-12-12 07:19:10 +01:00
Hadi Moshayedi 383d34f51b Tests for multi-statement transactions with subqueries or ctes 2019-12-11 19:54:15 -08:00
Hadi Moshayedi 939d3c955b Don't plan function joins locally 2019-12-11 16:53:29 -08:00
Hadi Moshayedi 067d92a7f6 Don't plan joins between ref tables and views locally 2019-12-11 14:31:34 -08:00
Hadi Moshayedi e3e174f30f Fix the way we check for local/reference table joins in the executor 2019-12-11 12:50:20 -08:00
SaitTalhaNisanci 13204487e9
remove copyright years (#3286) 2019-12-11 21:14:08 +03:00
SaitTalhaNisanci 3422e79f97
update contributing (#3284) 2019-12-11 20:55:21 +03:00
SaitTalhaNisanci c2823c9349
remove unused targets from makefile (#3283) 2019-12-11 20:37:56 +03:00
Marco Slot 7a1817370b
rename REMOTE_TRANS_INVALID to REMOTE_TRANS_IDLE (#3285)
rename REMOTE_TRANS_INVALID to REMOTE_TRANS_IDLE
2019-12-11 15:06:45 +01:00
SaitTalhaNisanci d10f97998c rename REMOTE_TRANS_INVALID to REMOTE_TRANS_NOT_STARTED 2019-12-11 15:24:18 +03:00
Önder Kalacı fecf61ef1f
Add missing ORDER BY in a CTE (#3282)
Otherwise, the query output might not be consistent.
2019-12-11 10:24:54 +01:00
Hadi Moshayedi 90568a87d0
Merge pull request #3113 from citusdata/refactor/insert_select
Move coordinator insert..select logic into executor
2019-12-10 11:37:38 -08:00
Marco Slot 133b8e1e0e Move coordinator insert..select logic into executor 2019-12-10 11:21:35 -08:00
Marco Slot 5d08ac3720
Fix inserts into local tables with distributed subqueries (#3271)
Fix inserts into local tables with distributed subqueries
2019-12-10 16:58:54 +01:00
SaitTalhaNisanci 8e5041885d Refactor isolation tests (#3062)
Currently in mx isolation tests the setup is the same except the creation of tables. Isolation framework lets us define multiple `setup` stages, therefore I thought that we can put the `mx_setup` to one file and prepend this prior to running tests. 

How the structure works:
- cpp is used before running isolation tests to preprocess spec files. This way we can include any file we want to. Currently this is used to include mx common part.
- spec files are put to `/build/specs` for clear separation between generated files and template files
- a symbolic link is created for `/expected` in `build/expected/`.
- when running isolation tests, as the `inputdir`, `build` is passed so it runs the spec files from `build/specs` and checks the expected output from `build/expected`.

`/specs` is renamed as `/spec` because postgres first look at the `specs` file under current directory, so this is renamed to avoid that since we are running the isolation tests from `build/specs` now.

Note: now we use `//` instead of `#` in comments in spec files, because cpp interprets `#` as a directive and it ignores `//`.
2019-12-10 16:12:54 +01:00
Önder Kalacı 5395ce6480
We don't support PG 10 anymore, so the sed rule can go away (#3277) 2019-12-10 12:40:43 +01:00
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