Commit Graph

3563 Commits

Author SHA1 Message Date
Alexey Zatelepin
9a92c0a55c sort key is distinct from primary key [#CLICKHOUSE-3859] 2018-11-13 16:12:49 +03:00
Alexey Zatelepin
580146eedb add primary key syntax [#CLICKHOUSE-3859] 2018-11-13 16:12:14 +03:00
Sabyanin Maxim
6296f58186 fix typo 2018-11-13 15:22:32 +03:00
Sabyanin Maxim
befaea63d2 add is_mutable method to AlterCommand. change comment column test 2018-11-13 15:08:07 +03:00
Sabyanin Maxim
b869cfed9a fixed couple of mistakes. 2018-11-12 18:45:35 +03:00
Ivan Lezhankin
4eb0f33ec2 Add some locks on freeze and support |freezeAll()| for replicated merge-tree. 2018-11-12 15:26:15 +03:00
Ivan Lezhankin
baf9566413 Fix style 2018-11-12 15:26:15 +03:00
Ivan Lezhankin
5d3da110a8 Refactor |freezePartition()| and |freezeAll()| 2018-11-12 15:26:15 +03:00
abyss7
0cdb808ded Fix comments 2018-11-12 15:26:15 +03:00
Ivan Lezhankin
935615a647 Reimplement FREEZE command. 2018-11-12 15:26:14 +03:00
Ivan Lezhankin
a837060454 Lock table structure before freezing. 2018-11-12 15:26:14 +03:00
Ivan Lezhankin
03e6a29eb2 Implement 'ALTER … FREEZE' command.
Need some tests!
2018-11-12 15:26:14 +03:00
Sabyanin Maxim
94594d8c06 add order_key section in system.tables 2018-11-11 18:44:21 +03:00
Sabyanin Maxim
9befbd94e4 is_in_order_key, is_in_partition_key, is_in_sample_key in system.columns works, is_in_primary_key not yet 2018-11-09 18:39:21 +03:00
Nikolai Kochetov
1e9aeba603 Split ExpressionAnalyzer and SyntaxAnalyzer. 2018-11-09 18:01:18 +03:00
Sabyanin Maxim
ac6aaa37b5 add is_primary_key, is_order_key, is_partition_key, is_sampling_key sections in system.columns 2018-11-09 15:02:08 +03:00
Sabyanin Maxim
51c7284583 add getSecondaryExpression 2018-11-09 12:41:52 +03:00
Sabyanin Maxim
c9d8dc6171 add primary_key, partition_key, sampling_key sections in system.tables. add getPartitionExpression method in IStorage. 2018-11-08 20:45:41 +03:00
Nikolai Kochetov
726ae0cb9a Split ExpressionAnalyzer and SyntaxAnalyzer. 2018-11-08 19:47:12 +03:00
Sabyanin Maxim
f8f2779f7b make ColumnComment just a hashmap 2018-11-08 15:03:42 +03:00
Sabyanin Maxim
dacd999d4f Merge branch 'master' into CLICKHOUSE-4032 2018-11-06 16:50:07 +03:00
Sabyanin Maxim
bdcdc15b1e fixed comment test.
remove ColumnComment struct.
style fixes
2018-11-06 16:26:43 +03:00
chertus
2f5fb25de6 Merge branch 'master' into joins 2018-11-02 13:39:19 +03:00
proller
c2a818b64d StorageSystemContributors clean (#3524)
* StorageSystemContributors clean

* Fix
2018-11-01 21:01:10 +03:00
alexey-milovidov
b1db9ec23c
Merge pull request #3436 from amosbird/master
Flexible fields assignment
2018-11-01 20:22:28 +03:00
alexey-milovidov
4dedead38f
Update StorageSystemDataTypeFamilies.cpp 2018-11-01 20:21:43 +03:00
alexey-milovidov
1a4a99377a
Update StorageSystemFunctions.cpp 2018-11-01 20:21:15 +03:00
alexey-milovidov
e10fd083ef
Update StorageSystemFunctions.cpp 2018-11-01 20:20:41 +03:00
alexey-milovidov
ac10a55b6f
Update StorageSystemDataTypeFamilies.cpp 2018-11-01 20:20:14 +03:00
proller
f86d1a7034 CONTRIB-254 Arcadia fixes (#3475)
* Macos: set ENABLE_EMBEDDED_COMPILER=0 by default (because contrib/llvm temporary broken under macos)

* \n

* arcadia fix

* fix arcadia link

* wip

* wip

* wip

* fix

* wip

* wip

* fix

* try use users from server dir

* Revert "try use users from server dir"

This reverts commit 79b2c6fd9c.

* Fix logging

* fix

* Update ZooKeeperImpl.h
2018-11-01 20:07:20 +03:00
chertus
d6defafad2 use AddDefaultDatabaseVisitor for views [CLICKHOUSE-3145] 2018-11-01 17:49:37 +03:00
proller
71403c3ff8 StorageSystemContributors.sh debug (#3491)
* Sql fuzzy test

* wip

* wip

* wip

* wip

* wip

* Build fixes

* better

* bugs

* wip

* fix

* Fix test

* build fixes

* better

* wip

* fix test

* StorageSystemContributors.sh debug

* debug

* wip

* more

* Fix jemalloc include

* more
2018-11-01 17:07:14 +03:00
proller
a7437b93a9 Commited StorageSystemContributors.generated.cpp (#3510)
* CLICKHOUSE-4085 system.contributors

* fi

* Fix random

* Commited StorageSystemContributors.generated.cpp

* fix

* Update CMakeLists.txt
2018-11-01 17:05:37 +03:00
Artem Zuikov
eb535c4b9b
Merge pull request #3500 from 4ertus2/joins
refactoring: one place for db and table extraction from AST
2018-11-01 14:59:56 +03:00
chertus
3931a4db5c Merge branch 'master' into joins 2018-10-31 18:11:23 +03:00
alesapin
791a1422de Enable merge with DIRECT_IO when summary size of participating parts more than 10GB 2018-10-31 12:24:58 +03:00
chertus
4ff0391ca6 DatabaseAndTableWithAlias - the only place for db & table expraction from AST 2018-10-30 19:31:21 +03:00
chertus
d2518fdb3f more refactoring: funcs to extract database_and_table from AST 2018-10-29 22:04:28 +03:00
Alex Zatelepin
83ac918bab
Merge pull request #3477 from hotid/master
stop generating empty WHERE () section in mysql queries (#3431)
2018-10-29 18:23:14 +03:00
Alex Zatelepin
fc99b7d389
style fixes 2018-10-29 17:17:58 +03:00
Sabyanin Maxim
73e9f5057d fix code style checker errors 2018-10-27 23:39:59 +03:00
Sabyanin Maxim
65bd40e290 Merge branch 'master' of github.com:yandex/ClickHouse into CLICKHOUSE-4032 2018-10-27 22:33:52 +03:00
proller
c35c979285 CLICKHOUSE-4085 system.contributors (#3452)
* CLICKHOUSE-4085 system.contributors

* fi

* Fix random
2018-10-26 20:43:50 +03:00
hotid
f22779ad15 stop generating empty WHERE () section in mysql queries 2018-10-26 20:14:43 +03:00
Amos Bird
3cf2177268 Flexible fields assignment
Field f;

before:

f = Int64(-42);

after:

f = -42;
2018-10-24 08:47:33 +08:00
alexey-milovidov
bb00bb8592
Merge pull request #3405 from yandex/CLICKHOUSE-2211
CLICKHOUSE-2211: Fix aio reading (with correct buffer size), reduce M…
2018-10-24 01:37:05 +03:00
alesapin
72e435893d Better comment 2018-10-23 14:19:01 +03:00
Alexey Milovidov
bac6b6f381 Fixed error #2863 2018-10-23 11:19:47 +03:00
Alexey Milovidov
b8cfa77ea0 Fixed build [#CLICKHOUSE-2] 2018-10-22 23:58:16 +03:00
alexey-milovidov
98c2ed582c
Merge pull request #2863 from VadimPE/ISSUES-2581
ISSUES-2581 fix SELECT with sequential consistency
2018-10-22 23:55:33 +03:00
alexey-milovidov
2deb510c59
Merge branch 'master' into master 2018-10-22 23:45:26 +03:00
alexey-milovidov
00d49602d3
Merge pull request #3404 from CurtizJ/CLICKHOUSE-3274
Add lock for .inner. table while insert.  [CLICKHOUSE-3274]
2018-10-22 23:32:12 +03:00
VadimPE
31794b7a46 fix codestyle 2018-10-22 14:58:56 +03:00
proller
2659e94573 Fix use after pop_back() 2018-10-19 20:27:38 +03:00
proller
67eb30d192 CLICKHOUSE-4074 Fix merge_tree_uniform_read_distribution=0 2018-10-19 19:31:51 +03:00
proller
abfe675097
Build fixes (#3419) 2018-10-18 22:28:05 +03:00
Marek Vavruša
37e03bd938 StorageKafka: check dependencies recursively, add max_block setting
Changes:

* Check table dependencies recursively before starting streaming
* Use actual number of created consumers when streaming
* Add size limits hint to Kafka consumer stream
* Configurable `kafka_max_block_size` per table
2018-10-18 09:20:34 -07:00
VadimPE
f2db463ab0 fix bug with merge part, wich us inserted with quorum 2018-10-18 17:14:07 +03:00
VadimPE
451114c9a3 rename partition -> part 2018-10-18 15:16:53 +03:00
VadimPE
4a93d3b836 fix addedparts 2018-10-18 14:51:40 +03:00
alesapin
87bb06fdd8 CLICKHOUSE-2211: Add exception for impossible case 2018-10-18 12:24:16 +03:00
alesapin
fe6406eac1 CLICKHOUSE-2211: Fix accident delition 2018-10-17 19:18:14 +03:00
alesapin
d78d569d42 CLICKHOUSE-2211: Fix aio reading (with correct buffer size), reduce MergeTreeReader creation and add useless test 2018-10-17 17:56:15 +03:00
CurtizJ
d81ed27004 add lock for .inner. table 2018-10-17 17:08:52 +03:00
Alexey Milovidov
99a64d3b92 Presumably better #2278 2018-10-17 06:13:00 +03:00
Alexey Milovidov
7c4d24ce39 Added comment [#CLICKHOUSE-3901] 2018-10-17 00:25:45 +03:00
Alexey Milovidov
98543b7c41 Fixed vertical merge of multidimensional Nested structures [#CLICKHOUSE-3901] 2018-10-17 00:22:41 +03:00
Sabyanin Maxim
e050bc0428 Merge branch 'master' into CLICKHOUSE-4032 2018-10-14 18:35:45 +03:00
Sabyanin Maxim
ab050c8466 add comment section in column declaration.
add comment column type in alter method.
add comment section in system.columns.
2018-10-14 18:30:06 +03:00
Kirill Shvakov
5600c35847 check drop type 2018-10-14 00:37:16 +03:00
Kirill Shvakov
0f509b9eb5 ReplicatedMergeTree: send drop request to the leader replica 2018-10-13 23:58:04 +03:00
Alexey Milovidov
f720a5bf95 Fixed typos in code #3373 2018-10-13 17:33:43 +03:00
Vadim
25b100c1f0
Update StorageReplicatedMergeTree.cpp 2018-10-10 19:23:50 +03:00
VadimPE
4db6eab5a3 ISSUES-2581 fix name 2018-10-10 19:20:15 +03:00
Alexey Zatelepin
d9a0432c6c don't quote single-field partition keys #3109 [#CLICKHOUSE-4054] 2018-10-10 18:57:04 +03:00
VadimPE
d4a56af660 ISSUES-2581 fix bug with new partition 2018-10-10 16:22:55 +03:00
alesapin
8591038748 Fix style and clang build 2018-10-10 11:38:54 +03:00
alexey-milovidov
1472e3ae66
Merge pull request #3210 from alex-krash/jdbc-bridge
External database access unification (jdbc/odbc bridges)
2018-10-10 02:26:56 +03:00
alesapin
32c6d0c699
Merge pull request #3182 from VadimPE/CLICKHOUSE-3947
CLICKHOUSE-3947 add LIKE and IN () for ODBC and MySQL
2018-10-09 20:12:32 +03:00
Alexey Milovidov
227ff8c606 Fixed comment [#CLICKHOUSE-2] 2018-10-09 17:30:05 +03:00
VadimPE
bcf8d5517e CLICKHOUSE-3947 fix const 2018-10-09 17:21:19 +03:00
VadimPE
da712d0036 CLICKHOUSE-3947 fix copy-paste and const 2018-10-09 17:13:08 +03:00
alexey-milovidov
ba62a24926
Merge pull request #3283 from yandex/FileOpenFixes_CLICKHOUSE-3943_
File open fixes clickhouse 3943
2018-10-05 00:00:47 +03:00
alexey-milovidov
b9d1eb4154
Merge pull request #3298 from yandex/fix-prewhere-with-altered-columns
Fix prewhere with altered columns
2018-10-04 23:57:11 +03:00
Nikolai Kochetov
b1fa3fab9d Fix prewhere whith final. #2827 2018-10-04 21:18:54 +03:00
alesapin
5a218a7363 CLICKHOUSE-3943: Change naming 2018-10-04 11:52:56 +03:00
Nikolai Kochetov
a6d0094835 Fix readnig missing column with prewhere. #2827 2018-10-04 10:51:06 +03:00
alesapin
252f9d0080 CLICKHOUSE-3943: Style 2018-10-03 20:12:38 +03:00
alesapin
441069fc5c [WIP] CLICKHOUSE-3943: Store last_readed_mark in MergeTreeThreadBlockInputStream and don't recreate reader if it stopped in appropriate position 2018-10-03 20:10:23 +03:00
VadimPE
40350c47e1 CLICKHOUSE-3947 del unused result_string 2018-10-03 15:10:35 +03:00
VadimPE
8df97e32af CLICKHOUSE-3947 fix bug with query.clone() 2018-10-03 15:03:39 +03:00
Alexandr Krasheninnikov
c7fee9374c fix formatting errors according code review 2018-10-03 13:44:43 +03:00
VadimPE
4152c34fbb CLICKHOUSE-4021 fix build 2018-10-03 13:08:02 +03:00
alexey-milovidov
94b0432faa
Merge pull request #3262 from proller/fix17
Arcadia sync
2018-10-01 22:00:01 +03:00
alexey-milovidov
7c6b08c21c
Merge pull request #3251 from CurtizJ/table-db-macros
Support {database} and {table} macros in ReplicatedMergeTree [CLICKHOUSE-3897]
2018-10-01 21:45:52 +03:00
proller
ca03cd6606 Sync with arcadia 2018-10-01 18:43:48 +03:00
Vadim
0849e1e218
Update transformQueryForExternalDatabase.cpp 2018-10-01 17:06:36 +03:00
VadimPE
d0981b733d CLICKHOUSE-3947 add recursive search for constant expressions 2018-10-01 16:27:39 +03:00
CurtizJ
ed77e40dfe fix implicit macros 2018-10-01 12:01:50 +03:00
alexey-milovidov
fd04b2b89a
Merge pull request #3215 from vavrusa/fix-kafka-lockups
Storages/Kafka: fixed deadlocks, moved to background pool
2018-10-01 04:30:03 +03:00
alexey-milovidov
bb0f76dd25
Update StorageKafka.cpp 2018-10-01 04:29:17 +03:00
alexey-milovidov
b9e6b02719
Update StorageKafka.cpp 2018-10-01 04:26:52 +03:00
Nikolai Kochetov
97add69825 Rename WithDictionary to LowCardinality. 2018-09-28 13:44:59 +03:00
Alexander Krasheninnikov
ceea4b9b33 New bridge interaction, quote identifier via api 2018-09-28 05:46:33 +03:00
Alexandr Krasheninnikov
4b431264db Implement quote getter from ODBC 2018-09-27 18:23:42 +03:00
CurtizJ
90240cb64b support database and table macros 2018-09-27 13:01:10 +03:00
alexey-milovidov
b6e53d22e1
Merge pull request #3200 from yandex/low-cardinality-function-result-cache
Added cache for low cardinality function result.
2018-09-26 18:12:48 +03:00
Marek Vavruša
ea32434888 Storages/Kafka: fixed deadlocks, moved to background pool
This fixes two deadlocks in Kafka engine found previously:
* When exception is thrown before starting reading, consumer
  was never returned to the storage. Now it is claimed only
  when actually starting reading.
* Fixed lockup on deinitialization when consumer only unsubscribed,
  but didn't close, and the endine then timeouted when waiting for
  consumer destruction.

This also moves the stream thread to background worker pool.
The reason for that is that it will compete with other tasks for
time, so it will form a backpressure on insertion when the system
is busy.
2018-09-25 22:51:07 -07:00
Alexandr Krasheninnikov
647d1041f1 Implement jdbc/idbc bridge connectors 2018-09-25 17:29:44 +03:00
Nikolai Kochetov
d526859011 Added cache for low cardinality function result. [#CLICKHOUSE-3904] 2018-09-25 16:48:52 +03:00
VadimPE
28102bc3b5 ISSUES-2581 get pointer to max_blocls 2018-09-24 12:53:28 +03:00
alexey-milovidov
4185351c8d
Merge pull request #3197 from yandex/fix_odbc_table_function
Fix odbc table function
2018-09-23 18:48:02 +03:00
alesapin
7c47644f7b Reuse base class function 2018-09-23 12:16:16 +03:00
alesapin
2aee8a5814 Fix odbc table function 2018-09-22 17:58:03 +03:00
alexey-milovidov
65f7c390f0
Merge pull request #3159 from zhang2014/fix/ISSUES-3134
ISSUES-3134 fix merge and distributed engine query stage
2018-09-22 00:09:06 +03:00
Alexey Zatelepin
c2c12f22f7 try to immediately delete the part after checksums mismatch [#CLICKHOUSE-2837] 2018-09-21 19:07:21 +03:00
Vadim
8c413e3f1f
Update ReplicatedMergeTreeQuorumAddedParts.h 2018-09-21 18:20:31 +03:00
VadimPE
17aa0356e5 del include 2018-09-21 18:15:35 +03:00
VadimPE
33545a41b6 fix style. And del getMaxBlock...() 2018-09-21 18:07:43 +03:00
VadimPE
8b8697bc5d Merge remote-tracking branch 'origin/master' into ISSUES-2581 2018-09-21 17:11:57 +03:00
Alexey Zatelepin
230a9fff2d Write the columns list of the resulting part in the same order as all_columns [#CLICKHOUSE-13] 2018-09-21 15:40:34 +03:00
VadimPE
60653fc042 CLICKHOUSE-3947 fix style 2018-09-21 14:33:58 +03:00
zhang2014
e0e805b1f6 ISSUES-3134 fix merge and distributed engine query stage 2018-09-21 11:19:25 +08:00
zhang2014
8a8189c7e9 ISSUES-3134 fix merge and distributed engine query stage 2018-09-21 09:08:44 +08:00
zhang2014
80d83bb50f ISSUES-3134 fix merge and distributed engine query stage 2018-09-21 09:08:44 +08:00
zhang2014
882125dd6d ISSUES-3134 fix merge and distributed engine query stage 2018-09-21 09:08:44 +08:00
alexey-milovidov
5d3027d4d0
Merge pull request #3171 from yandex/fix_segfault_on_incomplete_block
Reorder Squashing and adding default output stream in insert
2018-09-20 21:11:45 +03:00
alexey-milovidov
a2d8ee1caa
Merge pull request #3183 from 4ertus2/refactoring
refactoring: hide ASTIdentifier kind
2018-09-20 20:38:06 +03:00
VadimPE
3547334ba5 fix 2018-09-20 17:39:02 +03:00
VadimPE
c377389f62 CLICKHOUSE-3947 add LIKE and IN () 2018-09-20 17:34:30 +03:00
Alexey Zatelepin
0ec0a24bc9 fix use of temp variable after it gets out of scope 2018-09-20 16:55:22 +03:00
chertus
6442b5b167 refactoring: hide ASTIdentifier kind 2018-09-20 16:13:33 +03:00
alesapin
b87a084f38 Strict order of evaluated and added columns 2018-09-20 14:16:15 +03:00
VadimPE
89d408224b fix bug with part_name 2018-09-19 18:07:20 +03:00
VadimPE
2396b44519 fix 2018-09-19 17:44:30 +03:00
VadimPE
66b4a606d5 fix bug with add new partition in quorum 2018-09-19 17:34:41 +03:00
Alexey Zatelepin
b7cb8d1ae1 write correct columns list when UPDATEd part doesn't contain all columns [#CLICKHOUSE-13] 2018-09-19 16:04:52 +03:00
VadimPE
f05d93897b Del old class 2018-09-19 14:10:56 +03:00
VadimPE
17ffa8c310 fix class for added parts 2018-09-19 14:08:04 +03:00
VadimPE
96b117cb00 Revert "Update ReplicatedMergeTreeQuorumWriter.h"
This reverts commit e3add7f0c7.
2018-09-19 13:23:52 +03:00
Nikolai Kochetov
501940fa7e Fix reading from merge over distributed with prewhere. 2018-09-18 22:01:29 +03:00
alexey-milovidov
ded83c215c
Merge pull request #3150 from splichy/fix-storage-kafka-arg-schema
Fix Storage Kafka: Schema positional argument number
2018-09-17 21:49:48 +03:00
alexey-milovidov
13779bc75d
Merge pull request #3152 from zhang2014/fix/ISSUES-3149
ISSUES-3149 fix incorrectly masks rows in views
2018-09-17 18:57:47 +03:00
zhang2014
745696b888 ISSUES-3149 fix incorrectly masks rows in views 2018-09-17 23:30:15 +08:00
Vadim
e3add7f0c7
Update ReplicatedMergeTreeQuorumWriter.h 2018-09-17 16:05:20 +03:00
Vadim
3fabac31f6
Update ReplicatedMergeTreeQuorumWriter.h 2018-09-17 16:02:30 +03:00
Vadim
3b155638a0
Update ReplicatedMergeTreeQuorumWriter.h 2018-09-17 15:54:20 +03:00
Vadim
df9a01585a
Update ReplicatedMergeTreeQuorumWriter.h 2018-09-17 15:51:42 +03:00
Vadim
4dee095b9d
Update MergeTreeDataSelectExecutor.cpp 2018-09-17 15:43:14 +03:00
Vadim
204e1d437f
Merge branch 'master' into ISSUES-2581 2018-09-17 15:30:08 +03:00