Commit Graph

3589 Commits

Author SHA1 Message Date
alesapin
2985def91d Add tests 2021-05-27 15:54:47 +03:00
kssenii
a0d8d689d3 Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-05-27 15:44:12 +03:00
Maksim Kita
5e65aff3fd
Merge pull request #24466 from kitaisreal/dictionaries-update-file-paths-restrictions
Dictionaries update file path restrictions
2021-05-27 13:46:47 +03:00
alesapin
6924dd51a2 Merge branch 'master' into limited_fetches 2021-05-27 11:17:36 +03:00
Maksim Kita
4ca651838c
Merge pull request #24550 from kitaisreal/jit_example_update
Update jit_example
2021-05-27 01:02:31 +03:00
Maksim Kita
b26783b308 Dictionaries update file path restrictions 2021-05-27 00:17:45 +03:00
alesapin
42b2383e01 Basic throttler implementation 2021-05-26 23:37:44 +03:00
kssenii
73f16ee9ee Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-05-26 23:08:08 +03:00
Nicolae Vartolomei
be95a425d6 Avoid hiding errors like Limit for rows or bytes to read exceeded for subqueries 2021-05-26 16:45:05 +01:00
Maksim Kita
d56dc82784
Merge pull request #24468 from kitaisreal/compile-expressions-cached-functions-with-context-fix
CompileExpression cached functions with context fix
2021-05-26 10:52:22 +03:00
kssenii
940eab6924 Review fixes 2021-05-26 09:26:19 +03:00
Alexey Milovidov
20f59ffbb9 Merge branch 'master' into issue-16775 2021-05-26 03:46:43 +03:00
tavplubix
84f9d38620
Merge pull request #24321 from amosbird/fixdroppartition
Fix drop partition in rare case
2021-05-26 01:34:22 +03:00
Maksim Kita
c79f480e46 Fix expression compilation without cache 2021-05-25 23:53:46 +03:00
Maksim Kita
0eabdc7241 CompileExpression cached functions with context fix 2021-05-25 21:46:40 +03:00
Maksim Kita
315994f686
Merge pull request #24442 from kitaisreal/actions-dag-compile-expressions-update
ActionsDAG compile expressions update
2021-05-25 21:44:23 +03:00
Alexander Tokmakov
4849ea2e03 fix unexpected behavior in mutation finalization 2021-05-25 14:10:45 +03:00
Nikolai Kochetov
d4998909b6
Merge pull request #24463 from ClickHouse/fix-24024
Fix header mismatch for UNION.
2021-05-25 12:04:45 +03:00
Maksim Kita
ba43fe784c Updated tests 2021-05-25 11:50:40 +03:00
Maksim Kita
f9f1ac165c Update jit_example 2021-05-25 10:22:25 +03:00
Maksim Kita
0628fb8b1b
Merge pull request #24417 from kitaisreal/function-constant-result-with-nonconstant-arguments
Function constant result with nonconstant arguments
2021-05-24 23:16:47 +03:00
Nikolai Kochetov
79a0029843 Fix header mismatch for UNION. 2021-05-24 21:09:00 +03:00
Anton Popov
a36c1793d0 Merge remote-tracking branch 'upstream/master' into HEAD 2021-05-24 15:57:43 +03:00
Anton Popov
d1b9dcdcec fix build 2021-05-24 15:57:03 +03:00
Maksim Kita
7af4d5b86d Fixed tests 2021-05-24 14:25:02 +03:00
Amos Bird
7bc13f7ae8
Add initial_query_start_time to query log 2021-05-24 17:06:40 +08:00
Maksim Kita
b128221cf0 ActionsDAG compile expressions update 2021-05-24 11:59:27 +03:00
Maksim Kita
1a725d916b Upated LogicalFunctions 2021-05-24 10:16:12 +03:00
Maksim Kita
72fbb2dd54 Fixed tests 2021-05-24 10:16:12 +03:00
Maksim Kita
ed443c8941 Function constant result with nonconstant arguments 2021-05-24 10:16:12 +03:00
Alexey Milovidov
d32819f068 Mark false positives for PVS-Studio 2021-05-24 06:59:12 +03:00
Alexey Milovidov
54f0591aa5 Allow to ATTACH a table with experimental codecs 2021-05-24 06:47:00 +03:00
Alexey Milovidov
6f70feed2f Merge branch 'master' into issue-16775 2021-05-24 05:56:57 +03:00
Alexey Milovidov
ff7b5d34bb Mark false positives for PVS-Studio 2021-05-24 02:56:03 +03:00
kssenii
866b29fb5a Return list fds with Poco, more canonical 2021-05-23 10:56:13 +03:00
Maksim Kita
518552c866 Fixed tests 2021-05-23 01:37:54 +03:00
kssenii
1c43b333ea Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-05-22 21:26:48 +03:00
alexey-milovidov
1ed30f7246
Merge branch 'master' into issue-16775 2021-05-22 17:14:23 +03:00
Maksim Kita
42e91df363 Updated submodule to llvm12 2021-05-22 15:22:38 +03:00
Anton Popov
e3ca1cf94d Merge remote-tracking branch 'upstream/master' into rewrite-functions-to-subcolumns 2021-05-22 03:06:36 +03:00
Anton Popov
75adbd8e23 optimize some functions to subcolumns 2021-05-22 02:22:22 +03:00
alexey-milovidov
a25f1910cc
Merge pull request #24320 from ClickHouse/remove-auto-array
Remove AutoArray
2021-05-22 02:19:59 +03:00
kssenii
096d117f68 Review fixes 2021-05-22 00:12:46 +03:00
Anton Popov
13cfedd188 optimize some functions to subcolumns 2021-05-21 21:48:19 +03:00
mergify[bot]
970243850f
Merge branch 'master' into ast-table-identifier-2 2021-05-21 12:56:49 +00:00
vdimir
3e9dd96056
Merge branch 'master' into view-join-settings 2021-05-21 13:50:44 +03:00
mergify[bot]
96e22c1926
Merge branch 'master' into issue-23351 2021-05-21 10:31:40 +00:00
Alexey Milovidov
ea30bb7abf Improve implementation 2021-05-21 04:17:18 +03:00
kssenii
3dee003f9b Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-05-20 19:20:09 +03:00
Maksim Kita
cf5f36b70e LLVM JIT support AARCH64 2021-05-20 14:09:32 +00:00
vdimir
7e39e8474f
Merge branch 'master' into view-join-settings 2021-05-20 12:08:50 +03:00
Maksim Kita
af78649e56
Merge pull request #24023 from kitaisreal/compile-expressions-comparison-function-constant-case-with-alias-fix
CompileExpressions comparison function constant case fix
2021-05-20 10:58:38 +03:00
Maksim Kita
b0476c1fa2
Merge pull request #24273 from kitaisreal/expression-actions-compile-only-necessary-places
ExpressionActions compile only necessary places
2021-05-20 10:53:30 +03:00
Nikolai Kochetov
d09f3bcd0d
Merge pull request #24252 from ClickHouse/try-fix-group-by-shard-num-in-another-way
Try to fix GROUP BY _shard_num in a different way
2021-05-20 10:49:45 +03:00
alesapin
cf94bc9b8c
Merge pull request #24059 from ClickHouse/standalone_keeper
Standalone keeper server
2021-05-20 10:10:51 +03:00
Alexey Milovidov
1006a970f7 Remove AutoArray 2021-05-20 09:30:13 +03:00
Maksim Kita
c50909468f Updated ExpressionActionSettings 2021-05-19 17:32:07 +03:00
Maksim Kita
218f534a6f
Merge pull request #24100 from Enmk/fix_DateTime64_vs_DateTime_in_WHERE
Fix DateTime64 column vs DateTime value in where
2021-05-19 17:27:28 +03:00
Alexander Kuzmenkov
e9b69bbd70
Merge pull request #23906 from azat/fix-distributed_group_by_no_merge
distributed_group_by_no_merge fixes
2021-05-19 16:16:08 +03:00
Maksim Kita
9699299083 Fix build 2021-05-19 16:11:38 +03:00
Nikolai Kochetov
9f28d0966a Fix typos. 2021-05-19 15:43:10 +03:00
vdimir
4fcc901be9
Merge branch 'master' into issue-23351 2021-05-19 15:33:47 +03:00
Nikolai Kochetov
c07043fd97 Try fix more cases. 2021-05-19 15:16:18 +03:00
Nikolai Kochetov
9d152a3c4d
Update src/Interpreters/ClusterProxy/SelectStreamFactory.cpp
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
2021-05-19 13:40:46 +03:00
Maksim Kita
3d94798d9d Remove comment 2021-05-19 11:45:31 +03:00
Maksim Kita
150a88d647 ExpressionActions compile only necessary places 2021-05-19 11:43:16 +03:00
Nikolai Kochetov
85c0844439
Update SelectStreamFactory.cpp
Fix typo
2021-05-18 19:19:16 +03:00
Nikolai Kochetov
57f5e33464 Try to fix GROUP BY _shard_num 2021-05-18 18:17:19 +03:00
alesapin
31181095e7 Review fixes 2021-05-18 17:08:56 +03:00
kssenii
5f083b779d A little better, fix checks 2021-05-18 14:25:19 +03:00
Maksim Kita
40d8d95fd2
Merge pull request #24067 from azat/buffer-destroy-first
Flush Buffer tables before shutting down tables (within one database)
2021-05-18 09:07:28 +03:00
Maksim Kita
f5b9007d63 Small code simplification 2021-05-17 23:26:25 +03:00
kssenii
9b8df78fdd Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-05-17 17:42:05 +03:00
vdimir
392148ba86
Handle incorrect type of column in JoinCommon::removeColumnNullability 2021-05-17 14:24:34 +03:00
vdimir
80466427ad
Correct cardinality in MergeJoin (same as in input) 2021-05-17 14:18:03 +03:00
Maksim Kita
d923d9e6ef Function move file 2021-05-17 10:30:42 +03:00
Nikolai Kochetov
98e6c27a95
Merge pull request #24168 from amosbird/projection-fix3
Fix distributed processing when using projection
2021-05-17 09:45:39 +03:00
vdimir
d266050b23
Merge branch 'master' into issue-23351 2021-05-17 09:42:59 +03:00
Maksim Kita
20cced0a4c
Merge pull request #24155 from kitaisreal/function-refactoring
IFunction refactoring
2021-05-17 09:26:57 +03:00
kssenii
e9c3bc1836 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into progress-bar 2021-05-16 20:48:35 +00:00
Maksim Kita
843aa1ae28
Merge pull request #24169 from ucasFL/style
fix tiny code style
2021-05-16 18:20:34 +03:00
Amos Bird
07b1be5a76
Fix distributed processing when using projection 2021-05-16 22:40:06 +08:00
feng lv
fb3a627bd3 fix tiny code style 2021-05-16 14:14:59 +00:00
Azat Khuzhin
5a8d61954a Call IStorage::flush() for each table on DETACH DATABASE before shutdown 2021-05-16 13:28:35 +03:00
Azat Khuzhin
23981ffd0e Introduce IStorage::flushAndShutdown() 2021-05-16 13:23:53 +03:00
Nikolai Kochetov
093b7e120a
Merge pull request #24062 from amosbird/projection-fix1
Fix empty key projection query analysis
2021-05-16 07:37:03 +03:00
Maksim Kita
947f28d430 IFunction refactoring 2021-05-15 20:33:15 +03:00
Kseniia Sumarokova
99e2f83c69
Merge pull request #23548 from ucasFL/table-comment
Implement table comments
2021-05-15 19:56:16 +03:00
vdimir
8dddcebe8c
Handle correct nullability with low card in HashJoin 2021-05-15 17:09:51 +03:00
vdimir
9091bba3d6
Restore correct cardinality in HashJoin 2021-05-15 14:39:13 +03:00
vdimir
be966f0e8c
Revert "Try to not remove lowcard in merge join"
This reverts commit 35bbbd05b6.
2021-05-15 14:26:59 +03:00
Maksim Kita
0b4b5eb808 FunctionComparison remove constant result for non constant arguments optimization 2021-05-15 00:03:26 +03:00
Maksim Kita
18894005ac Update ExpressionJIT.cpp 2021-05-15 00:03:26 +03:00
Maksim Kita
f42b25e65c Update ExpressionJIT.cpp 2021-05-15 00:03:26 +03:00
Maksim Kita
26be39f419 CompileExpressions comparison function constant case fix 2021-05-15 00:03:26 +03:00
feng lv
8c82e3f1b9 fix style
fix
2021-05-14 15:50:05 +00:00
Amos Bird
a113acc40c
Fix empty key 2021-05-14 22:54:14 +08:00
Ivan Lezhankin
bd16dd22b9 Merge remote-tracking branch 'upstream/master' into ast-table-identifier-2 2021-05-14 15:40:33 +03:00
vdimir
35bbbd05b6
Try to not remove lowcard in merge join 2021-05-14 15:10:56 +03:00
Nikolai Kochetov
bb11cde871
Merge pull request #24108 from ClickHouse/actions-dag-calc-header
Calculate header from ActionsDAG
2021-05-14 13:55:00 +03:00
Nikolai Kochetov
782f02b1dc Review fixes. 2021-05-14 13:01:27 +03:00
Nikolai Kochetov
a1e9202b93 Review fixes. 2021-05-14 12:30:32 +03:00
kssenii
db849eb3e5 Remaining poco 2021-05-14 11:02:17 +03:00
kssenii
c25be65ebf Refactor progress bar, adjust progress indication for reading from file 2021-05-14 06:16:31 +00:00
kssenii
f33a517d33 Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-05-14 02:58:26 +03:00
Azat Khuzhin
aeb2c5d88a Preserve dictionaries until storage shutdown
v2: Context::loadEmbeddedDictionaries()
v3: Context::loadDictionaries()
2021-05-13 22:03:00 +03:00
Nikolai Kochetov
bc4ccdece6 Fix tests. 2021-05-13 21:07:47 +03:00
Vasily Nemkov
1330ef7567 Fixed converting const DateTime to DateTime64 in WHERE 2021-05-13 20:16:00 +03:00
vdimir
6a24e9599f
Upd comment for makeConvertingActions 2021-05-13 17:22:53 +03:00
Nikolai Kochetov
d78be51fb4 Calculate header for ActionsDAG 2021-05-13 16:38:18 +03:00
kssenii
e82d717233 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into progress-bar 2021-05-13 10:20:02 +00:00
feng lv
c6f8ab9826 fix 2021-05-13 02:05:53 +00:00
Alexander Kuzmenkov
833f48751a
Merge pull request #24048 from ClickHouse/aku/insert-select-bytes
for trivial INSERT SELECT, adjust block size in bytes as well
2021-05-12 22:33:35 +03:00
kssenii
0527f0ea33 Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-05-12 16:54:18 +03:00
Alexander Kuzmenkov
2536247754
Update src/Interpreters/InterpreterInsertQuery.cpp 2021-05-12 12:42:21 +03:00
Alexander Kuzmenkov
70d4ee3cde for trivial INSERT SELECT, adjust block size in bytes as well 2021-05-12 12:40:39 +03:00
Maksim Kita
ffdc2b22a5
Merge pull request #24022 from amosbird/fixalias
Make `prefer_column_name_to_alias` setting more standard
2021-05-12 09:54:04 +03:00
Nikolai Kochetov
a1ba67e029
Merge pull request #20202 from amosbird/projection
Projections
2021-05-12 09:38:07 +03:00
kssenii
81797393f1 fs::last_write_time, fs::space 2021-05-12 09:19:11 +03:00
alexey-milovidov
d422e0199b
Merge pull request #24019 from Avogar/rename-uniq-theta
Rename uniqThetaSketch to uniqTheta
2021-05-12 01:17:18 +03:00
Amos Bird
62153e7030
Fix 2021-05-12 02:30:16 +08:00
Maksim Kita
72d46beca0
Merge pull request #23979 from azat/dict-preallocate
Reimplement preallocate for hashed/sparse_hashed dictionaries
2021-05-11 20:15:46 +03:00
feng lv
9035e3a643 fix test and conflict 2021-05-11 16:22:24 +00:00
kssenii
3439492700 fs::last_write_time 2021-05-11 19:14:58 +03:00
Pavel Kruglov
704bbe0aeb Raname uniqThetaSketch to uniqTheta 2021-05-11 17:39:35 +03:00
kssenii
393b026f2e Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-05-11 16:49:23 +03:00
Amos Bird
5836e2e277
Fix issues in normal projection 2021-05-11 18:12:29 +08:00
Amos Bird
dfa5629071
Remove projection type ast 2021-05-11 18:12:29 +08:00
Amos Bird
51d685bb9c
Even more fixes 2021-05-11 18:12:29 +08:00
Amos Bird
718c284437
Fix more tests 2021-05-11 18:12:28 +08:00
Amos Bird
ba17acbd63
Fix tests 2021-05-11 18:12:28 +08:00
Amos Bird
a3fd0b6f2e
Fix tests 2021-05-11 18:12:28 +08:00
Amos Bird
42f161b1dc
Fix more 2021-05-11 18:12:28 +08:00
Amos Bird
9c069ebdbf
support prewhere, row_filter, read_in_order and decent projection selection
TODO set index analysis in projection
2021-05-11 18:12:27 +08:00
Amos Bird
f7f949c1f9
Fix aggregation keys order 2021-05-11 18:12:27 +08:00
Amos Bird
35961c0c5d
Use ActionsDAG to rewrite projection queries 2021-05-11 18:12:27 +08:00
Nikolai Kochetov
29d7038e30
Add ProjectionDescription::Type enum. Remove some checks. 2021-05-11 18:12:27 +08:00
Amos Bird
ebaf42a448
Reformat and fix some tests 2021-05-11 18:12:27 +08:00
Nikolai Kochetov
c2396c5144
Disable read-in-order optimization in case of projections. 2021-05-11 18:12:26 +08:00
Amos Bird
483bd165e7
Check if pipeline is simple and add more comments 2021-05-11 18:12:26 +08:00
Nikolai Kochetov
3d36fb57eb
Cleanup code. 2021-05-11 18:12:26 +08:00
Nikolai Kochetov
3296c9292f
Try to merge projectons faster. 2021-05-11 18:12:26 +08:00
Amos Bird
cd6414639e
add metadata_snapshot to getQueryProcessingStage 2021-05-11 18:12:26 +08:00
Amos Bird
264cff6415
Projections
TODO (suggested by Nikolai)

1. Build query plan fro current query (inside storage::read) up to WithMergableState
2. Check, that plan is simple enough: Aggregating - Expression - Filter - ReadFromStorage (or simplier)
3. Check, that filter is the same as filter in projection, and also expression calculates the same aggregation keys as in projection
4. Return WithMergableState if projection applies

3 will be easier to do with ActionsDAG, cause it sees all functions, and dependencies are direct (but it is possible with ExpressionActions also)

Also need to figure out how prewhere works for projections, and
row_filter_policies.

wip
2021-05-11 18:12:23 +08:00
Kruglov Pavel
fb038c1985
Merge pull request #23894 from pingyu/datasketches-uniq-again
Add uniqThetaSketch again
2021-05-11 11:24:43 +03:00
Kruglov Pavel
49e7ed6e60
Merge pull request #23673 from amosbird/partitionvalue
Add _partition_value virtual column
2021-05-11 11:23:00 +03:00
Alexey Milovidov
b2ca5cd98b Merge branch 'master' into normalize-bigint 2021-05-11 02:05:40 +03:00
Maksim Kita
a4d7e190ac CompileDAG fix Sip hash 2021-05-10 22:47:07 +03:00
alexey-milovidov
066acc71b6
Merge pull request #8482 from ClickHouse/enable-compile-expressions
Enable "compile_expressions" by default
2021-05-10 21:09:18 +03:00
alexey-milovidov
ab33b80edc
Merge pull request #23962 from azat/external-group-by-overflow-row-fix
Fix SIGSEGV for external GROUP BY and overflow row
2021-05-10 20:02:05 +03:00
vdimir
cb89a2be97
StorageJoin clashing column name with JOIN ON 2021-05-10 17:56:12 +03:00
vdimir
f03f591e55
Upd comments for StoreageJoin 2021-05-10 17:54:32 +03:00
vdimir
bd90b52f8e
Merge branch 'master' into issue-20309 2021-05-10 16:28:18 +03:00
Maksim Kita
71b994b417 CompileDAG updated SipHash 2021-05-10 15:56:55 +03:00
Maksim Kita
e72c139bf6 Fixed code review issues 2021-05-10 11:09:32 +03:00
Maksim Kita
f2a2f85f63
Merge pull request #23981 from ucasFL/type
use LowCardinality for AsynchronousMetricLog name column
2021-05-10 10:58:58 +03:00
Maksim Kita
8bc511eaa0 Fix LLVMExecutableFunction called with const arguments 2021-05-10 01:02:54 +03:00
alexey-milovidov
1ea637d996
Merge pull request #23970 from ClickHouse/pvs-studio-fixes-6
PVS-Studio fixes, part 6
2021-05-09 21:45:19 +03:00
Alexey Milovidov
02fd1d4bc3 Fix clang-tidy 2021-05-09 20:02:37 +03:00
Alexey Milovidov
ab94a559da Fix clang-tidy 2021-05-09 20:02:22 +03:00
feng lv
683af72cc8 use LowCardinality for AsynchronousMetricLog name column 2021-05-09 16:25:28 +00:00
Alexey Milovidov
9753ddc8a0 Merge branch 'master' of github.com:yandex/ClickHouse into normalize-bigint 2021-05-09 18:54:29 +03:00
Alexey Milovidov
5618352512 Fix clang-tidy 2021-05-09 17:48:36 +03:00
Alexey Milovidov
28c4ef29b1 Fix clang-tidy 2021-05-09 17:48:11 +03:00
kssenii
ab1a05a1f4 Poco::Path to fs::path, less concatination 2021-05-09 14:59:49 +03:00
Azat Khuzhin
4c47d91c94 Attach background thread for dictionary reload to the reload query 2021-05-09 14:30:31 +03:00
Azat Khuzhin
80f4059deb Drop unused getDictionaryConfigurationFromAST.h 2021-05-09 14:25:45 +03:00
Alexey Milovidov
fa678fc7a6 utils/generate-ya-make/generate-ya-make.sh 2021-05-09 03:28:33 +03:00
Alexey Milovidov
f476a5c5d7 utils/generate-ya-make/generate-ya-make.sh 2021-05-09 03:28:10 +03:00
Alexey Milovidov
903c306e04 Fix some PVS-Studio warnings 2021-05-09 01:10:10 +03:00
Alexey Milovidov
ab9b116310 Fix some PVS-Studio warnings 2021-05-09 01:09:16 +03:00
Maksim Kita
99c25feafe
Merge pull request #23965 from azat/aggregator-logs
Round floats in Aggregator log messages
2021-05-08 22:38:02 +03:00
Alexey Milovidov
2d3647c5b0 Merge branch 'master' into normalize-bigint 2021-05-08 21:22:32 +03:00
Maksim Kita
2a630b68a4 Fixed FunctionComparison with special edge case 2021-05-08 21:04:21 +03:00
Alexey Milovidov
ad88819ee4 Fix a bunch of warnings from PVS-Studio 2021-05-08 19:13:10 +03:00
Alexey Milovidov
3025f9e141 More fixes for PVS-Studio 2021-05-08 19:12:49 +03:00
Alexey Milovidov
e905883c75 More fixes for PVS-Studio 2021-05-08 19:12:31 +03:00
Alexey Milovidov
8d62c42eb9 A bunch of changes for PVS-Studio 2021-05-08 19:11:50 +03:00
Alexey Milovidov
bdc372cb9a Fix bad code (found by PVS-Studio) 2021-05-08 19:11:40 +03:00
Alexey Milovidov
604daa9581 Fix a bunch of warnings from PVS-Studio 2021-05-08 19:09:17 +03:00
Alexey Milovidov
45dea86395 More fixes for PVS-Studio 2021-05-08 18:35:09 +03:00
Alexey Milovidov
2fbecf36ca More fixes for PVS-Studio 2021-05-08 18:20:40 +03:00
Azat Khuzhin
6b11319cdf Round floats in Aggregator log messages 2021-05-08 18:01:24 +03:00
kssenii
266567e04c Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-05-08 17:49:05 +03:00
Azat Khuzhin
4cecc238d6 Fix SIGSEGV for external GROUP BY and overflow row
Overflow row is used for GROUP BY if all of the above is true:
- WITH TOTALS is requested
- max_rows_to_group_by > 0
- group_by_overflow_mode = any
- totals_mode != after_having_exclusive

And in case of overflow row and external GROUP BY, once the temporary
file dumps to disk it resets without_key data variant to nullptr, so any
subsequent dump to disk will cause SIGSEGV.

Fix this, by recreating without_key data variant after dumping to disk,
instead of reseting to nullptr.

And also add sanity check (LOGICAL_ERROR) to make error more
deterministic in case of such error.

Found with fuzzer [1].

  [1]: https://clickhouse-test-reports.s3.yandex.net/23929/e7027e052998540ee660d186727e20f9555b729d/fuzzer_ubsan/report.html#fail1
2021-05-08 17:48:24 +03:00
Alexey Milovidov
9e1a5f41fc A bunch of changes for PVS-Studio 2021-05-08 17:43:03 +03:00
Maksim Kita
6dc0dcdfa4 Fixed code review issues 2021-05-08 17:39:35 +03:00
Maksim Kita
dd44d93f49 Fixed compile expressions 2021-05-08 17:39:35 +03:00
alexey-milovidov
b76503a4ea Update ActionsDAG.cpp 2021-05-08 17:39:35 +03:00
Maksim Kita
21d8684aaf Added CHJIT documentation 2021-05-08 17:39:35 +03:00
Maksim Kita
050cb74ed0 Fix compiled if statement 2021-05-08 17:39:35 +03:00
Maksim Kita
8df4e866f3 Fixed clickhouse-client log 2021-05-08 17:39:35 +03:00
Maksim Kita
72d610be2e Updated CHJIT interface to be more thread safe 2021-05-08 17:39:35 +03:00
Maksim Kita
7778172a1f Fixed compilable function 2021-05-08 17:39:35 +03:00
Maksim Kita
4db7e49ccf Fixed Date, DateTime native type 2021-05-08 17:39:35 +03:00
Maksim Kita
16a07f61ae Refactored CompileDAG build algorithm 2021-05-08 17:39:35 +03:00
Maksim Kita
8828599380 Fixed style check 2021-05-08 17:39:35 +03:00
Maksim Kita
c79d7eae21 Refactored interfaces 2021-05-08 17:39:35 +03:00
Maksim Kita
24798ef07c Updated interfaces 2021-05-08 17:39:34 +03:00
Maksim Kita
d2eecfe593 Updated Nullable default implementation 2021-05-08 17:39:34 +03:00
Maksim Kita
8d6c282e0a Fixed test 2021-05-08 17:39:34 +03:00
Maksim Kita
af06f5b68b Fixed UUID test 2021-05-08 17:39:34 +03:00
Maksim Kita
97d87eb518 Fixed JITMemoryManager 2021-05-08 17:39:34 +03:00
Maksim Kita
e40aa26611 Fixed MSan 2021-05-08 17:39:34 +03:00
Maksim Kita
baf1978124 CHJIT updated thread safe interface 2021-05-08 17:39:34 +03:00
Maksim Kita
2b58357a77 Fixed tests 2021-05-08 17:39:34 +03:00
Maksim Kita
69fdcdcc4a Fixed tests 2021-05-08 17:39:34 +03:00
Maksim Kita
231433d951 Fixed style check 2021-05-08 17:39:34 +03:00
Maksim Kita
ca9a23abbc Fix build 2021-05-08 17:39:34 +03:00
Maksim Kita
e58e956092 Enable llvm in fast test 2021-05-08 17:39:34 +03:00
Maksim Kita
3ec4409d52 Added CHJIT 2021-05-08 17:39:34 +03:00
Maksim Kita
ca44ff2ede Updated example 2021-05-08 17:39:34 +03:00
Maksim Kita
c264e42542 Updated example 2021-05-08 17:39:34 +03:00
Maksim Kita
9f88fea760 Updated test 2021-05-08 17:39:34 +03:00
Maksim Kita
6b70cbd53c Added jit example 2021-05-08 17:39:34 +03:00
Alexey Milovidov
78867a53c6 Fixed build 2021-05-08 17:39:34 +03:00
Alexey Milovidov
996cdd327c Addition to prev. revision 2021-05-08 17:39:34 +03:00
Alexey Milovidov
e862580898 Added comment 2021-05-08 17:39:34 +03:00
Alexey Milovidov
f7830eb7b3 Unpoison data generated by JIT-ed functions for MSan 2021-05-08 17:39:34 +03:00
Alexey Milovidov
aa727e941d Fix bad code (found by PVS-Studio) 2021-05-08 17:21:36 +03:00
alexey-milovidov
680860aae7
Merge pull request #23912 from azat/CU
Cleanup IDatabase.h from extra headers
2021-05-08 16:42:56 +03:00
Alexey Milovidov
47a4c101b9 Merge branch 'master' into normalize-bigint 2021-05-08 16:41:15 +03:00
hexiaoting
cca53e59f5 Fix bug 2021-05-07 17:17:43 +08:00
hexiaoting
a1d521902c Merge remote-tracking branch 'origin/master' into dev-continue-sundyli 2021-05-07 14:22:53 +08:00
Alexey Milovidov
c1bb5bfc2b BloomFilterHash for UUID 2021-05-07 03:23:32 +03:00
kreuzerkrieg
e86d8950c2 Drop unnecessary ports where applicable 2021-05-06 20:30:24 +03:00
fibersel
cb53bbb7b0 add experimental codecs flag, add integration test for experimental codecs 2021-05-06 14:57:22 +03:00
vdimir
1e4fda08e2
Allow JOIN ON with Join engine 2021-05-06 09:08:41 +03:00
Azat Khuzhin
c757b532c6 Make DatabaseCatalog.cpp self compilable (missing AbstractConfiguration) 2021-05-06 09:07:58 +03:00
vdimir
abdb731ce2
Merge branch 'master' into issue-20309 2021-05-06 09:07:51 +03:00
Alexey Milovidov
2c9ae14cb0 Add 256 bit integers in some places 2021-05-06 03:31:09 +03:00
Azat Khuzhin
eefd67fce5 Disable optimize_distributed_group_by_sharding_key with window functions 2021-05-06 00:44:22 +03:00
Azat Khuzhin
8703b7863d Fix distributed_group_by_no_merge=2 with GROUP BY
Before this patch the following query:

  SELECT assumeNotNull(argMax(dummy, 1))
  FROM remote('127.1', system.one)
  SETTINGS distributed_group_by_no_merge = 2

Leads to:

  Code: 10. DB::Exception: Received from localhost:9000. DB::Exception: Not found column argMax(dummy, 1) in block: while executing 'INPUT : 0 -> argMax(dummy, 1) UInt8 : 0'.

Since it tries to execute function one more time, but shards will not
send this column when the query processed with
distributed_group_by_no_merge=2 (i.e. up to
WithMergeableStateAfterAggregation).

v0: no exception
v2: execut window functions
v3: throw exception, since executing window function in this case will
lead to messy output
2021-05-06 00:21:47 +03:00
kssenii
2dabdd0f73 Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-05-05 18:42:40 +03:00
kssenii
5ef3ee50fe Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into progress-bar 2021-05-05 09:26:12 +00:00
pingyu
46f809d07f Revert "Merge pull request #23334 from ClickHouse/revert-22609-datasketches-uniq"
This reverts commit af2499359b, reversing
changes made to db82e9e3d5.
2021-05-05 16:42:57 +08:00
Alexey Milovidov
54fb40c041 Fix OpenTelemetry 2021-05-05 01:42:14 +03:00
Alexey Milovidov
eea47a65d2 PVS-Studio 2021-05-04 15:13:47 +03:00
Alexey Milovidov
86169cc36e Merge branch 'master' into normalize-bigint 2021-05-04 14:53:42 +03:00
Alexey Milovidov
aa9a367d45 Fix issue #7834 2021-05-04 02:27:05 +03:00
Alexey Milovidov
02ce9cc725 Untangle UUID 2021-05-04 01:46:51 +03:00
Alexey Milovidov
8ecd9d36e6 Add UInt128 conversion functions 2021-05-03 18:41:37 +03:00
Alexey Milovidov
9f74565948 PVS-Studio 2021-05-03 01:42:01 +03:00
Alexey Milovidov
1fda866881 Merge branch 'master' into normalize-bigint 2021-05-02 21:24:45 +03:00
Nikolai Kochetov
08f10dced0
Merge pull request #23743 from ClickHouse/refactor-join-step
Refactor join step
2021-05-02 21:17:23 +03:00
feng lv
39f68bf5ff fix conflict 2021-05-02 16:33:45 +00:00
kssenii
ee06936596 Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-05-01 17:24:31 +03:00
alexey-milovidov
f360e7c808
Merge pull request #23766 from kitaisreal/remove-unused-compilers
Remove unused compilers (fixed for the troublesome "unbundled" build)
2021-05-01 16:15:38 +03:00
Vladimir
3b7c68196b
Merge pull request #23429 from Jokser/disk-s3-restart-possibility 2021-05-01 15:28:14 +03:00
Alexey Milovidov
b879d05ec4 Fix build 2021-05-01 10:06:30 +03:00