Commit Graph

13892 Commits

Author SHA1 Message Date
CurtizJ
009c973312 remove redundant comment 2018-09-28 16:47:34 +03:00
CurtizJ
f9fb73ce2e fix distributed "create table as select" query 2018-09-28 16:44:39 +03:00
robot-clickhouse
6f96dfc7da Auto version update to [18.14.1] [54409] 2018-09-28 14:58:24 +03:00
alexey-milovidov
b84a499a93
Merge pull request #3231 from zhang2014/fix/ISSUES-3225
ISSUES-3225 fix alias conflict when predicate optimization
2018-09-28 14:46:54 +03:00
Nikolai Kochetov
97add69825 Rename WithDictionary to LowCardinality. 2018-09-28 13:44:59 +03:00
Alexey Milovidov
138e70197e Fixed comments and docs #3241 2018-09-28 06:42:08 +03:00
Alexey Milovidov
169dbfe200 Fixed discrepancy between default values of "log_queries" and "log_query_threads" settings [#CLICKHOUSE-4030] 2018-09-28 06:40:39 +03:00
Nikolai Kochetov
5a211b1ab7 More comments. 2018-09-27 18:16:47 +03:00
Nikolai Kochetov
65c8a00e51 Fix low cardinality functions result cache if function can't be executed on default arguments. 2018-09-27 17:45:35 +03:00
CurtizJ
90240cb64b support database and table macros 2018-09-27 13:01:10 +03:00
zhang2014
b35ab511cb ISSUES-3225 fix alias conflict when predicate optimization 2018-09-27 14:29:38 +08:00
Marek Vavruša
a971a0bc07 PushingToViewsBlockOutputStream: process blocks concurrently
The current model is to process blocks for attached views in sequence.
This is not ideal when the processing time for each view varies, or is
blocking (for example with replicated tables), as processing of next-in-line
view is blocked by wait in it's predecessor.

This commit changes the behavior to process 2 or more attached views concurrently.
2018-09-26 15:22:06 -07:00
alexey-milovidov
03d85227d1
Merge pull request #3229 from yandex/fix-datetime-conversion-when-inserting-in-values-format
Fix conversion between Date and DateTime when inserting in VALUES format and "input_format_values_interpret_expressions" is true
2018-09-27 00:20:04 +03:00
Alexey Milovidov
30da8de1b6 Send log message about peak memory usage to client #3230 2018-09-27 00:19:49 +03:00
Alexey Milovidov
99927a3518 Returned logging peak memory usage in query scope #3230 2018-09-27 00:10:43 +03:00
Alexey Milovidov
0928acdf8a Removed dead code #3230 2018-09-27 00:02:54 +03:00
Alexey Milovidov
b1b53a4019 Added test #3143 2018-09-26 23:49:44 +03:00
Alexey Milovidov
dd88c092b7 Attempt to fix inconsistent values in total memory tracker #3143 2018-09-26 23:45:40 +03:00
Alexey Milovidov
836c20b2d3 \Merge branch 'master' of github.com:yandex/ClickHouse 2018-09-26 22:48:59 +03:00
Alexey Milovidov
721837efe9 Adapted test #3205 2018-09-26 22:48:47 +03:00
alexey-milovidov
28bd1e8eff
Merge pull request #3224 from 4ertus2/decimal
Supertypes for decimal and integers [issue-3218]
2018-09-26 22:47:10 +03:00
Alexey Milovidov
e90484db77 Fix conversion between Date and DateTime when inserting in VALUES format and "input_format_values_interpret_expressions" is true #3226 2018-09-26 22:43:10 +03:00
chertus
4442437396 minor fix 2018-09-26 18:34:53 +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
alexey-milovidov
2471332dfc
Update IFunction.h 2018-09-26 18:02:56 +03:00
chertus
a564b05ec7 supertypes for decimal and ints [issue-3218] 2018-09-26 17:59:23 +03:00
alexey-milovidov
6374094f0c
Merge pull request #3202 from zhang2014/fix/ISSUES-3145
ISSUES-3145 support qualified asterisk
2018-09-26 17:41:01 +03:00
chertus
3ff2cfb4af fix div by zero in decimal var/stddev 2018-09-26 15:38:36 +03:00
chertus
b48402e871 intDiv, intDivOrZero for decimal [issue-3221] 2018-09-26 15:12:45 +03:00
alexey-milovidov
60000481e4
Merge pull request #3219 from topvisor/add_biz_to_insignificant_second_level_domains
Update firstSignificantSubdomain function
2018-09-26 14:54:43 +03:00
Veloman Yunkan
3e96f32833 Fixed the bug introduced by PR#3144
The pre-existing optimization in the function
JSONEachRowRowInputStream::readColumnName() (that was extracted
during the refactoring step of PR#3144) imposed a restriction
on its usage - reading from the input stream might invalidate the return
value of that function, and this is what happenned in readJSONObject()
after the call to skipColonDelimiter().

One way of fixing the problem while preserving the original optimization
intact would be to defer the call to skipColonDelimiter() until the
variable name_ref was fully consumed, however that would result in worse
code (skipColonDelimiter() would need to be called in three different
places where it doesn't really belong).

Therefore I preferred to slightly weaken the optimization by always
copying the key name into the current_column_name data member.
2018-09-26 11:27:04 +00:00
chertus
69dd660919 fix crash on decimal division by zero [issue-3221] 2018-09-26 14:25:50 +03:00
decaseal
963988ddf2
Update firstSignificantSubdomain function
Add "biz" domain to list of "insignificant" second-level domains
2018-09-26 12:39:04 +03:00
Marek Vavruša
cbbcb6d9df Formats/CapnProtoRowInputStream: support Nested and Tuple, fix alignment issues
This updated contrib/capnproto to a newer version that fixes problems with
unaligned access to message frames.

It also adds support for parsing Struct types as Tuple (named or unnamed),
and Nested array types.

The `struct X { a @0 :UInt64; b @1 :Text }` in Cap'nProto is equivalent to
`x Tuple(a UInt64, b String)` in ClickHouse.

Arrays of Struct types such as `y List(X)` are equivalent to `y Nested(a UInt64, b String)`.
2018-09-25 22:51:35 -07: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
Alexey Milovidov
33e4865240 Adjusted test #3205 2018-09-26 05:33:29 +03:00
Alexey Milovidov
57822ad592 Improvement #3205 2018-09-26 04:30:07 +03:00
Alexey Milovidov
042536177d Merge branch 'master' into order-by-remerge 2018-09-26 04:24:35 +03:00
Alexey Milovidov
b11a84b895 Merge branch 'master' of github.com:yandex/ClickHouse into every_function_in_own_file_5 2018-09-26 03:36:20 +03:00
Alexey Milovidov
0e7caa05fa Every function in its own file, part 5 [#CLICKHOUSE-2] 2018-09-26 03:32:38 +03:00
Alexey Milovidov
27b7654abc Every function in its own file, part 5 [#CLICKHOUSE-2] 2018-09-26 03:31:40 +03:00
chertus
96ceca6c05 fix decimal to int, int to decimal convertion [issue-3177] 2018-09-25 19:03:50 +03:00
Nikolai Kochetov
d526859011 Added cache for low cardinality function result. [#CLICKHOUSE-3904] 2018-09-25 16:48:52 +03:00
zhang2014
b887ec8e98 ISSUES-3145 support qualified asterisk 2018-09-25 10:42:51 +08:00
alexey-milovidov
002331be1b
Merge pull request #3204 from CurtizJ/CLICKHOUSE-3527
Better code in #3101.
2018-09-25 00:28:11 +03:00
Alexey Milovidov
5cc8e802d5 Added test #3205 2018-09-25 00:02:40 +03:00
Alexey Milovidov
9fbde09725 Memory tracker: added watermark logging #3205 2018-09-24 23:57:10 +03:00
Alexey Milovidov
81e2fe14e5 Better messages #3205 2018-09-24 23:30:02 +03:00
Alexey Milovidov
8e7c6598e8 Added remerge step to process ORDER BY with LIMIT when memory usage is high #3179 2018-09-24 23:07:30 +03:00
Alexey Milovidov
17b8e20922 Failover for hosts with missing DNS records while connecting to ZooKeeper #3201 2018-09-24 22:09:12 +03:00
CurtizJ
d0ed96aa04 better code 2018-09-24 22:08:11 +03:00
Alexey Milovidov
73f68b5ee4 Miscellaneous [#CLICKHOUSE-2] 2018-09-24 21:44:09 +03:00
Alexey Milovidov
5f6328646a utils/check-style/check-style -n #3101 2018-09-24 21:02:25 +03:00
alexey-milovidov
b6c7d71a03
Merge pull request #3101 from CurtizJ/CLICKHOUSE-3527
CLICKHOUSE-3527 Fix race while parallel ddl queries
2018-09-24 20:59:57 +03:00
robot-clickhouse
ca465cd20b Auto version update to [18.14.0] [54409] 2018-09-24 20:52:21 +03:00
zhang2014
f3dcc2ef41 ISSUES-3145 support qualified asterisk 2018-09-24 23:28:18 +08:00
chertus
f09970ff70 add test for inner join [CLICKHOUSE-4001] 2018-09-24 16:55:26 +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
Alexey Milovidov
bb654ff307 Fixed trash #3195 2018-09-22 21:12:14 +03:00
Alexey Milovidov
b972742f9a Fixed bad code; updated docs #3195 2018-09-22 21:07:27 +03:00
alexey-milovidov
76cb9ff873
Update Context.cpp 2018-09-22 18:22:54 +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-milovidov
433e8cce26
Merge pull request #3194 from yandex/fix-replica-cyclic-fetch
Fix cyclical failed fetches when merges don't produce identical result
2018-09-21 23:05:40 +03:00
alexey-milovidov
babc145f5f
Merge pull request #3188 from yandex/fix_segfault_3151
Add isState for array function combinator
2018-09-21 22:30:15 +03:00
Alexey Zatelepin
9ee53caee0 add test [#CLICKHOUSE-2837] 2018-09-21 19:45:57 +03:00
Alexey Zatelepin
c2c12f22f7 try to immediately delete the part after checksums mismatch [#CLICKHOUSE-2837] 2018-09-21 19:07:21 +03:00
alesapin
2e1f4737f0 Add test 2018-09-21 17:49:27 +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
proller
0047987333 CLICKHOUSE-3885: add partition_key alias (#3166)
* Allow run integration tests from ctest: cmake .. -DENABLE_TEST_INTEGRATION=1 && ninja && ctest -V -R integration

* CLICKHOUSE-3885: add partition_key alias

* fix

* Update ClusterCopier.cpp

* Better test

* fixing..
2018-09-21 13:46:58 +03:00
alexey-milovidov
b1eb66c03e
Merge branch 'master' into low-cardinality-fixes 2018-09-21 13:43:37 +03:00
alexey-milovidov
17d50ecef0
Merge pull request #3186 from CurtizJ/CLICKHOUSE-3979
Fix bug in Cube #3172
2018-09-21 13:38:46 +03:00
alexey-milovidov
4a54a1c310
Merge pull request #3138 from yandex/low-cardinality-group-by
Low cardinality group by
2018-09-21 13:38:20 +03:00
Nikolai Kochetov
3e742a6b55 Review fixes. 2018-09-21 12:49:43 +03:00
alesapin
4d29141957 Add isState for array function combinator 2018-09-21 12:37:09 +03:00
Nikolai Kochetov
94bb37f261 Fix low cardinality permutation. 2018-09-21 11:52:07 +03:00
CurtizJ
b355ac8e71 fix bug 2018-09-21 10:23:31 +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
8bfdcc6464 Fix style [#CLICKHOUSE-2] 2018-09-20 23:57:06 +03:00
Alexey Milovidov
7d291142ec Less dependencies [#CLICKHOUSE-2] 2018-09-20 23:51:21 +03:00
Alexey Milovidov
16dacff488 Fixed build [#CLICKHOUSE-2] 2018-09-20 23:50:58 +03:00
Alexey Milovidov
47934d1cce Merge branch 'master' of github.com:yandex/ClickHouse 2018-09-20 23:21:37 +03:00
Alexey Milovidov
d95300eb7f Less dependencies [#CLICKHOUSE-2] 2018-09-20 23:21:29 +03: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
be77567e4f
Update AddingDefaultBlockOutputStream.cpp 2018-09-20 21:09:01 +03:00
alexey-milovidov
e74615f29e
Update AddingDefaultBlockOutputStream.cpp 2018-09-20 21:07:10 +03:00
alexey-milovidov
4a095d8433
Merge pull request #3172 from CurtizJ/CLICKHOUSE-3979
Add modificator CUBE [CLICKHOUSE-3979]
2018-09-20 21:04:56 +03:00
CurtizJ
a6841f5882 Merge remote-tracking branch 'origin/CLICKHOUSE-3979' into CLICKHOUSE-3979 2018-09-20 21:01:46 +03:00
alexey-milovidov
0d2c6dff24
Update Aggregator.h 2018-09-20 20:59:47 +03:00
CurtizJ
b89feb1572 replace bool by enum 2018-09-20 20:51:42 +03:00
alexey-milovidov
06b5c53335
Update TwoLevelHashTable.h 2018-09-20 20:44:10 +03:00
alexey-milovidov
a52de29fbf
Update ColumnWithDictionary.h 2018-09-20 20:41:54 +03:00
alexey-milovidov
a2d8ee1caa
Merge pull request #3183 from 4ertus2/refactoring
refactoring: hide ASTIdentifier kind
2018-09-20 20:38:06 +03:00
Nikolai Kochetov
ce8329d802 Fix test with names tuples. 2018-09-20 20:36:16 +03:00
alexey-milovidov
f558d5b2df
Update 00720_with_cube.sql 2018-09-20 20:35:54 +03:00
alexey-milovidov
7a9500a3f1
Update InterpreterSelectQuery.cpp 2018-09-20 20:33:47 +03:00
Anton Popov
dd1b130048
Update CubeBlockInputStream.cpp 2018-09-20 20:32:57 +03:00
alexey-milovidov
cdcb301937
Merge pull request #3176 from yandex/format-date-time-further-attempts
Performance improvement of formatDateTime.
2018-09-20 20:29:22 +03:00
CurtizJ
5f2db689dc fix tests 2018-09-20 19:32:07 +03:00
CurtizJ
8644853558 optimize 2018-09-20 18:46:37 +03:00
alesapin
94287f3199 Finally fixed 2018-09-20 18:35:52 +03:00
Alexey Milovidov
3eb183f21e Fixed build; better #3176 2018-09-20 17:46:31 +03:00
VadimPE
3547334ba5 fix 2018-09-20 17:39:02 +03:00
VadimPE
e93f56bb50 fix 2018-09-20 17:37:55 +03:00
VadimPE
c377389f62 CLICKHOUSE-3947 add LIKE and IN () 2018-09-20 17:34:30 +03:00
Nikolai Kochetov
673acbdf94 Added more comments. 2018-09-20 17:19:12 +03:00
Alexey Zatelepin
0ec0a24bc9 fix use of temp variable after it gets out of scope 2018-09-20 16:55:22 +03:00
Nikolai Kochetov
d8a9525cf9 Added test with low acrdinality and array functions. #3004 2018-09-20 16:53:29 +03:00
alesapin
c13ffed085 Remove redundant changes 2018-09-20 16:26:32 +03:00
Nikolai Kochetov
d66527ec15 Fix functions with Array(LowCardinality) arguments. #3004 2018-09-20 16:16:30 +03:00
chertus
6442b5b167 refactoring: hide ASTIdentifier kind 2018-09-20 16:13:33 +03:00
alesapin
0f12e028a5 Fix insert for native format 2018-09-20 15:59:33 +03:00
alesapin
dfa3e7e1cd Missed changes 2018-09-20 14:40:04 +03:00
alesapin
b87a084f38 Strict order of evaluated and added columns 2018-09-20 14:16:15 +03:00
Nikolai Kochetov
19d00cde7e Added test for low cardinality with in function. #3004 2018-09-20 13:57:52 +03:00
Nikolai Kochetov
d2fbc3df58 Fix in function for low cardinality argument. #3004 2018-09-20 13:55:10 +03:00
CurtizJ
f9ff586415 optimize 2018-09-20 13:44:13 +03:00
Nikolai Kochetov
5e4c5dd1c9 Fix functions on low cardinality with cons tesult. 2018-09-20 11:32:33 +03:00
Alexey Milovidov
2878f39e1e Added performance tests #3176 2018-09-19 23:48:25 +03:00
Alexey Milovidov
200860724e More tests #3176 2018-09-19 23:36:32 +03:00
Alexey Milovidov
2236435ed8 Added comment #2770 2018-09-19 23:23:33 +03:00
Alexey Milovidov
68a4ad0034 Added comment #2770 2018-09-19 23:22:58 +03:00
Alexey Milovidov
b396818632 Added comment #2770 2018-09-19 23:20:39 +03:00
Alexey Milovidov
44de6a0317 Improved performance 1.5..1.8 times #2770 2018-09-19 23:07:46 +03:00
alesapin
cf195ed832 Fix test 2018-09-19 20:52:09 +03:00
alesapin
2b3e29f607 Take header from first block in Squashing stream 2018-09-19 20:39:04 +03:00
Nikolai Kochetov
bb570fa1a8 Fix low cardinality serialization test reference. 2018-09-19 17:43:12 +03:00
Nikolai Kochetov
2df05cf620 Fix native deserealization for nullable low cardinality. 2018-09-19 17:43:07 +03:00
Nikolai Kochetov
b93ea8e7cc Fixed default value index for LowCardinality(Nullable). 2018-09-19 17:42:59 +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
alesapin
e1c8045055 Fix error with header 2018-09-19 15:56:56 +03:00
alesapin
bb4be0515b Add test for segfault 2018-09-19 15:18:10 +03:00
chertus
f39d78b0bc AVG() exception instead of division by zero 2018-09-19 15:11:21 +03:00
CurtizJ
fe0bdbe42c fix test 2018-09-19 15:07:55 +03:00
CurtizJ
31bf960bfe add new syntax 2018-09-19 14:18:38 +03:00
Nikolai Kochetov
79e3ae2f75 Fix cast Null to LowCardinality(Nullable). #3066 2018-09-19 14:11:52 +03:00
alesapin
520446df53 Reorder Squashing and adding default output stream in insert 2018-09-19 14:09:12 +03:00
alesapin
c2f3453fda Reorder Squashing and adding default output stream in insert 2018-09-19 14:06:42 +03:00
Nikolai Kochetov
926dfa82f3 Added test for low cardinality alter add column. #3066 2018-09-19 14:05:21 +03:00
Alexey Zatelepin
badefe14bc allow ON CLUSTER for ALTER UPDATE #3158 2018-09-19 14:01:09 +03:00
Nikolai Kochetov
1c611e2ad5 Fix low cardinality column deserialization from empty stream. #3114 2018-09-19 13:27:46 +03:00
CurtizJ
8f7daa75d1 update comments 2018-09-19 12:34:07 +03:00
alexey-milovidov
5ac1c763b1
Merge pull request #3165 from yandex/fix-prewhere-from-storage-merge-over-distributed
Fix reading from merge over distributed with prewhere.
2018-09-19 00:10:34 +03:00
Alexey Milovidov
2b74fd8a01 Style #2770 2018-09-18 22:44:15 +03:00
Alexey Milovidov
ead7baa805 Little better #2770 2018-09-18 22:41:42 +03:00