Commit Graph

5588 Commits

Author SHA1 Message Date
Vladimir
7c77dd1e21
Minor changes in splitByRegexp 2021-05-13 12:21:00 +03:00
Alexander Kuzmenkov
99ab98b64c fix the tests 2021-05-13 12:06:59 +03:00
abel-wang
452dec891d correct reference name 2021-05-13 16:54:17 +08:00
Nikolai Kochetov
636b86d13e Disable 01710_projection_fetch for database replicated. 2021-05-13 11:13:24 +03:00
Pavel Kruglov
42d7621aee Change tests 2021-05-13 10:20:24 +03:00
abel-wang
51c1d7c7ba split into characters when split by '' & add docs 2021-05-13 11:15:38 +08:00
abel-wang
99b9fe6c33 add function splitByRegexp 2021-05-13 10:37:09 +08:00
feng lv
c6f8ab9826 fix 2021-05-13 02:05:53 +00:00
Pavel Kruglov
cef7c8700b Try to fix tests 2021-05-13 00:48:06 +03:00
Pavel Kruglov
86f061976e Some fixes 2021-05-12 22:02:56 +03:00
Pavel Kruglov
8ed6ad7c55 Refactor, support all types in array, add nested arrays support, more tests 2021-05-12 19:06:08 +03:00
Anton Popov
46ce4b7a88
Merge pull request #24016 from MaxWk/order-by-with-fill-datetime64
support for order by fill with DateTime64
2021-05-12 14:44:36 +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
a5ad3324c9 Skip 01710_projection_fetch for parallel execution. 2021-05-12 09:42:01 +03:00
Nikolai Kochetov
a1ba67e029
Merge pull request #20202 from amosbird/projection
Projections
2021-05-12 09:38:07 +03:00
万康
aa43d3cff9 fix tests and code style 2021-05-12 11:44:45 +08:00
alexey-milovidov
e8524d6e69
Update 01867_support_datetime64_version_column.reference 2021-05-12 01:19:51 +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
Pavel Kruglov
704bbe0aeb Raname uniqThetaSketch to uniqTheta 2021-05-11 17:39:35 +03:00
Nikolai Kochetov
817bc1377c Fix part check for projections. 2021-05-11 17:07:19 +03:00
Nikolai Kochetov
0e469f3ebf Try fix test. 2021-05-11 16:19:51 +03:00
万康
36fc6432ce support for order by fill with DateTime64 2021-05-11 21:03:32 +08:00
tavplubix
430f558234
Update 01154_move_partition.sh 2021-05-11 15:31:13 +03:00
alexey-milovidov
f6c9327fd5
Update 01867_support_datetime64_version_column.sql 2021-05-11 15:29:48 +03:00
alexey-milovidov
3bb480bd37
Update 01867_support_datetime64_version_column.sql 2021-05-11 15:29:37 +03:00
万康
04f00b2b42 add tests 2021-05-11 20:00:34 +08:00
Nikolai Kochetov
89f16014b8 fix fetch for projection. 2021-05-11 14:44:59 +03: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
ddd4256a15
More fixes 2021-05-11 18:12:28 +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
Nikolai Kochetov
b736515c66
More tests. 2021-05-11 18:12:28 +08:00
Amos Bird
a3fd0b6f2e
Fix tests 2021-05-11 18:12:28 +08:00
Amos Bird
f7f949c1f9
Fix aggregation keys order 2021-05-11 18:12:27 +08:00
Amos Bird
e1e560765c
Fix missing columns 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
233e8bc927
Added test with normal projections. 2021-05-11 18:12:27 +08:00
Amos Bird
483bd165e7
Check if pipeline is simple and add more comments 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
alexey-milovidov
6d0bd4f7d2
Merge pull request #23969 from ClickHouse/aku/long-trace-id
support longer query ids in trace log for perf tests
2021-05-10 23:35:40 +03:00
Maksim Kita
4a22924ed5
Merge pull request #23946 from FArthur-cmd/8912-fix-dict-http-source
Add support for HTTP compression in dictionary source.
2021-05-10 22:52:07 +03:00
tavplubix
547e1f5a23
Update 01154_move_partition.sh 2021-05-10 22:31:13 +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
Alexander Tokmakov
eef899ae63 better code, add test 2021-05-10 21:03:37 +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
Azat Khuzhin
808d1a0215 Reimplement preallocate for hashed/sparse_hashed dictionaries
It was initially implemented in #15454, but was reverted in #21948 (due
to higher memory usage).

This implementation differs from the initial, since now there is
separate attribute to enable preallocation, before it was done
automatically, but this has problems with duplicates in the source.

Plus this implementation does not uses dynamic_cast, instead it extends
IDictionarySource interface.
2021-05-10 07:41:48 +03:00
Alexander Kuzmenkov
e7225b8bee fix the tests 2021-05-10 07:18:21 +03:00
FArthur-cmd
fc104f0d0d improving test to cover updates 2021-05-09 23:04:06 +03:00
FArthur-cmd
6363a5dd96 use path to define compression type 2021-05-09 21:58:08 +03:00
Alexey Milovidov
9753ddc8a0 Merge branch 'master' of github.com:yandex/ClickHouse into normalize-bigint 2021-05-09 18:54:29 +03:00
FArthur-cmd
cc583fde4f tests reference 2021-05-09 15:54:01 +03:00
FArthur-cmd
bd519075b7 adding checking url in HTTPSource 2021-05-09 14:27:11 +03:00
Maksim Kita
e517436ba4
Merge pull request #23961 from kitaisreal/array-difference-decimal-math-overflow
Function arrayDifference decimal math overflow
2021-05-09 14:04:35 +03:00
Alexey Milovidov
67200d5a96 Split test (it is too large) 2021-05-08 23:15:54 +03:00
Maksim Kita
290e1ec307 Functional stateless tests fix numbers 2021-05-08 21:13:27 +03:00
Maksim Kita
2a630b68a4 Fixed FunctionComparison with special edge case 2021-05-08 21:04:21 +03:00
Azat Khuzhin
f1aebbe927 Check that totals correctly calculated in 01865_aggregator_overflow_row
Change aggregation function to uniqCombined() to check this.
2021-05-08 20:43:01 +03:00
Maksim Kita
0a2ea38cc9
Merge pull request #23916 from azat/dict-found_rate
Measure found rate for dictionaries
2021-05-08 19:23:52 +03:00
Alexander Kuzmenkov
308c4657ce support longer query ids in trace log for perf tests 2021-05-08 18:20:42 +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
Maksim Kita
57d5f55d7f Added jit if test 2021-05-08 17:39:35 +03:00
Azat Khuzhin
bdb5dad3a3 Cover system.dictionaries.found_count
v2: fix for ANTRL
v3: add all dictionaries layouts
2021-05-08 17:09:01 +03:00
Maksim Kita
108c2022d9 Function arrayDifference decimal math overflow 2021-05-08 17:01:30 +03:00
Alexey Milovidov
47a4c101b9 Merge branch 'master' into normalize-bigint 2021-05-08 16:41:15 +03:00
Maksim Kita
80dbb7ca4f
Merge pull request #23948 from azat/dict-range-min-max-check
Check MIN/MAX attributes in the list of dictionary attributes
2021-05-08 16:07:26 +03:00
FArthur-cmd
acb09f01d4 fixing details in code style and moving tests 2021-05-08 12:46:50 +03:00
Maksim Kita
b617c57ce8
Merge pull request #23929 from azat/dict-cache-source-dups-fix
Fix keys metrics accounting for CACHE() dictionary with duplicates in the source
2021-05-08 11:56:20 +03:00
FArthur-cmd
c6c80085b8 solving problem with same test naming 2021-05-08 10:15:55 +03:00
FArthur-cmd
13a6e03849 solving style-check problems 2021-05-08 10:15:14 +03:00
Azat Khuzhin
8e9655d513 Check MIN/MAX attributes in the list of dictionary attributes
This way there will be proper exception instead of std::out_of_range
2021-05-08 08:59:47 +03:00
Alexey Milovidov
dd4e002b5c Adjust a test after relaxed overflow checks 2021-05-08 03:38:56 +03:00
Alexey Milovidov
53637d7be0 Adjust a test after relaxed overflow checks 2021-05-08 03:38:15 +03:00
Alexey Milovidov
89d56f1668 Fix bad test 2021-05-08 03:36:28 +03:00
Alexey Milovidov
1f69f8c475 Make test for Decimal correct 2021-05-08 03:33:01 +03:00
Alexey Milovidov
e8c29bf15f Adjust test because rounding in conversion of Float to Decimal has changed 2021-05-08 03:27:23 +03:00
Alexey Milovidov
5f3377cb84 Adapt test after some overflow checks were removed 2021-05-08 03:24:56 +03:00
Alexey Milovidov
059bdd89dc Adapt test after some overflow checks were removed 2021-05-08 03:22:34 +03:00
FArthur-cmd
4ea9851e99 fixing dictionary http source by adding wrapper 2021-05-08 02:20:30 +03:00
Alexey Milovidov
e49b44a0fd Update generateRandom tests 2021-05-08 01:09:51 +03:00
Azat Khuzhin
c1b213b96e Fix 01863_dictionary_cache_duplicates under ANTLR parser
By do not start name of table/dict from number.
2021-05-08 00:59:55 +03:00
Alexey Milovidov
c404e6db2f Merge branch 'master' of github.com:yandex/ClickHouse into normalize-bigint 2021-05-07 18:25:12 +03:00
Anton Popov
01e99ab72e
Merge pull request #23871 from CurtizJ/cast-operator
Add postgres-like cast operator
2021-05-07 16:29:22 +03:00
alexey-milovidov
fd56e0a984
Merge pull request #23919 from ucasFL/hint-enum
Add hints for enum names
2021-05-07 16:12:16 +03:00
Anton Popov
efd64c6d57 add test to skip list 2021-05-07 02:52:51 +03:00
Alexey Milovidov
ef280a2698 Update test 2021-05-07 01:47:20 +03:00
Anton Popov
e51cd90c6f better cast operator 2021-05-06 21:21:10 +03:00
Azat Khuzhin
e7027e0529 Fix keys metrics accounting for CACHE() dictionary with duplicates in the source 2021-05-06 21:03:20 +03:00
feng lv
59f5f2d03c Add hints for enum names
add test
2021-05-06 14:22:54 +00:00
Alexey Milovidov
a4f134fcab Update test (but not the reference) 2021-05-06 03:30:26 +03:00
Alexey Milovidov
206f9e0a4b Fix test that depends on configuration too much 2021-05-06 01:14:54 +03:00
Alexey Milovidov
d283870f3d Fix test that depends on configuration too much 2021-05-06 01:14:32 +03:00
Alexey Milovidov
8827857fc3 Fix bad test 2021-05-06 01:09:50 +03:00
Alexey Milovidov
969649c4e5 Fix bad test (tabs) 2021-05-06 01:09:50 +03:00
Alexey Milovidov
3bf9a1f5c0 Fix bad test 2021-05-06 01:09:08 +03:00
Alexey Milovidov
6959057393 Fix bad test (tabs) 2021-05-06 01:03:27 +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
6ac50ab9c5 Extend 01568_window_functions_distributed for distributed_group_by_no_merge 2021-05-06 00:24:39 +03:00
Azat Khuzhin
e5cff95cc8 Avoid deadlock due to Log usage in 01568_window_functions_distributed 2021-05-06 00:24:39 +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
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
Azat Khuzhin
74269882f7 Add broken_data_files/broken_data_compressed_bytes into distribution_queue 2021-05-04 22:48:07 +03:00
Anton Popov
d4ea53f642 fix test 2021-05-04 17:28:40 +03:00
Anton Popov
2b79bf838f add postgres-like cast operator 2021-05-04 06:43:17 +03:00
feng lv
2347a1f6f3 update test 2021-05-03 16:19:48 +00:00
feng lv
39f68bf5ff fix conflict 2021-05-02 16:33:45 +00:00
Vladimir
3b7c68196b
Merge pull request #23429 from Jokser/disk-s3-restart-possibility 2021-05-01 15:28:14 +03:00
alexey-milovidov
72d9e4d340
Merge pull request #23813 from nikitamikhaylov/move-partiton-lost
Add test for #18170
2021-05-01 11:31:36 +03:00
alexey-milovidov
711cc5f62b
Merge pull request #23823 from azat/tests-wait
Improve 00840_long_concurrent_select_and_drop_deadlock
2021-05-01 08:30:32 +03:00
alexey-milovidov
7ca42d2ce1
Merge pull request #23805 from ClickHouse/fix-hedged-requests-ext-tables
Fix sending external table for hedged connections.
2021-05-01 08:13:13 +03:00
Maksim Kita
fa1e9de7f7
Merge pull request #23782 from ClickHouse/merging-array-product-function
Merging array product function
2021-05-01 00:53:57 +03:00
Azat Khuzhin
2b7818ba6d Improve 00840_long_concurrent_select_and_drop_deadlock
Improve waiting in the test to avoid hung check triggering [1].

  [1]: https://clickhouse-test-reports.s3.yandex.net/23744/73ab415c4c27e481cddf4d6d70b24e79fb8d8941/stress_test_(thread).html#fail1
2021-04-30 23:50:13 +03:00
Nikita Mikhaylov
080802e043 add test 2021-04-30 18:00:47 +03:00
Maksim Kita
14e879cef9
Merge pull request #23781 from ucasFL/fix-clear-column
Fix CLEAR COLUMN does not work after #21303
2021-04-30 17:28:59 +03:00
Nikolai Kochetov
352ec049ad Fix sending external table for hedged connections. 2021-04-30 17:19:48 +03:00
Nikolai Kochetov
4bb56849b3
Merge pull request #23763 from amosbird/rowfilterfix
Fix crash when prewhere and row policy filter are both in effect with empty result
2021-04-30 16:25:36 +03:00
Maksim Kita
44b966af5a Removed const path for arrayAggregation 2021-04-30 12:33:34 +03:00
Maksim Kita
aa71b4a6df
Merge pull request #22242 from hexiaoting/dev_arrayproduct
Introduce arrayProduct function
2021-04-30 09:55:21 +03:00
feng lv
aed2f337e9 Fix CLEAR COLUMN does not work after #21303 2021-04-30 05:02:32 +00:00
alexey-milovidov
b029e9e4f6
Merge pull request #23050 from ClickHouse/remove-strange-code-fix-19283
Remove wrong code, fix #19283
2021-04-29 22:00:02 +03:00
Amos Bird
70ec13f3d3
Fix empty block with row_filter 2021-04-29 19:40:14 +08:00
tavplubix
1cecc0d724
Update 01184_long_insert_values_huge_strings.sh 2021-04-29 13:34:43 +03:00
Vladimir
1a8407e029
Merge pull request #23237 from vdimir/fix-join-lowcard-nullable 2021-04-29 13:18:04 +03:00
alexey-milovidov
7a2f6f4277
Update 01184_long_insert_values_huge_strings.sh 2021-04-29 09:46:14 +03:00
Azat Khuzhin
73ab415c4c Preserve errors for INSERT into Distributed
Before this patch (and after #22208) the INSERT may fail with "Cannot
schedule a task" because the pool in DistributedBlockOutputStream
already throws exception and simply fail in writeSuffix().
2021-04-28 22:33:29 +03:00
vdimir
6e4b37a45e
Merge branch 'master' into fix-join-lowcard-nullable 2021-04-28 20:06:49 +03:00
Nikolai Kochetov
9392b493d9 Skip 01823_explain_json for antlr 2021-04-28 19:33:49 +03:00
Nikolai Kochetov
c508868570
Merge pull request #23082 from ClickHouse/explain-output
JSON output for EXPLAIN
2021-04-28 15:39:06 +03:00
Maksim Kita
b544037f03
Merge pull request #23436 from kitaisreal/storage-dictionary-updated
Refactored StorageDictionary
2021-04-28 13:11:48 +03:00
Nikita Mikhaylov
bbd1068d6e
Merge pull request #23643 from nikitamikhaylov/pp-segfault
Segfault on INSERT in HTTPHandler
2021-04-27 13:43:21 +03:00
Nikita Mikhaylov
02a53ff2c0
Merge pull request #23654 from nikitamikhaylov/mann-whitney-bug
`mannWhitneyUTest` same values in both samples
2021-04-27 13:42:52 +03:00
RedClusive
1a8871be36 fix test 2021-04-27 09:49:24 +00:00
RedClusive
508efc8321 fix test 2021-04-27 08:44:48 +00:00
Amos Bird
8a3b5c1fab
Add _partition_value virtual column 2021-04-27 16:15:59 +08:00
alexey-milovidov
186b1128d0
Merge pull request #23310 from amosbird/fixbugindex
Don't relax NOT conditions during partition pruning.
2021-04-27 07:13:18 +03:00
alexey-milovidov
013555907c
Merge pull request #23314 from excitoon-favorites/tdigest
Fixed `quantile(s)TDigest` inaccuracies
2021-04-27 06:57:44 +03:00
Alexey Milovidov
0cefaf0f4b Speedup test 2021-04-27 06:54:09 +03:00
Alexey Milovidov
83b071a3d9 Merge branch 'master' into remove-strange-code-fix-19283 2021-04-27 06:34:46 +03:00
Nikita Mikhaylov
710921dc46 fix tests 2021-04-27 02:12:15 +03:00
Nikita Mikhaylov
7dc0f27c88 done 2021-04-26 21:07:30 +03:00
Nikita Mikhaylov
9a70136bcf better 2021-04-26 18:50:40 +03:00
Maksim Kita
0c012d4288 Fixed tests 2021-04-26 13:52:41 +03:00
Maksim Kita
561b045991 Fixed tests 2021-04-26 13:52:41 +03:00
Maksim Kita
e5079c87db Added test 2021-04-26 13:52:41 +03:00