Commit Graph

7989 Commits

Author SHA1 Message Date
Alexander Tokmakov
7e2bc184ec fix another suspicious places, add test 2021-10-07 16:43:49 +03:00
Nikolai Kochetov
25e2ebac75
Merge pull request #29782 from azat/lc-concurrent-GROUP-BY-fix
Fix concurrent access to LowCardinality during GROUP BY (leads to SIGSEGV)
2021-10-07 16:27:53 +03:00
feng lv
4841b31b56 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into filelog-engine 2021-10-07 13:20:08 +00:00
Alexander Tokmakov
afd69ef833 fix check for nondeterministic mutations 2021-10-07 15:24:40 +03:00
Anton Popov
4bc14dedfb
Merge pull request #28352 from Avogar/div-null
Avoid division by zero when denominator is Nullable
2021-10-07 14:47:53 +03:00
nicelulu
7d74f26ce9 128bit hash-functions accepting arbitrary list of arguments
add sipHash128 return UInt128.

better test.

better combineHashes

better test

Fix build
2021-10-07 19:25:39 +08:00
Kruglov Pavel
13b2fdc23b
Merge pull request #29659 from amosbird/jsonfix3
Fix nullable processing in JSONFunctions
2021-10-07 13:55:22 +03:00
Alexander Tokmakov
5365cc686f Merge branch 'master' into improvement_for_strange_mutations 2021-10-07 13:26:58 +03:00
Vladimir C
0422939893
Merge pull request #29281 from lingtaolf/bugfix/tupleFilter 2021-10-07 12:24:26 +03:00
Nikolai Kochetov
4ab2e2745b
Merge pull request #29786 from azat/parallel_view_processing-fix
Fix parallel_view_processing
2021-10-07 12:15:26 +03:00
Vladimir C
b02c12b182
Merge pull request #23881 from darkkeks/fix-cross-to-inline-join-error-condition 2021-10-07 11:09:36 +03:00
Maksim Kita
4ec7311d4d
Merge pull request #29738 from kitaisreal/added-function-ngram
Added function ngram
2021-10-07 10:21:00 +03:00
feng lv
28f8e1c297 fix
update test
2021-10-07 05:33:12 +00:00
Amos Bird
41a80a8852
Add more tests 2021-10-07 04:02:44 +08:00
Amos Bird
a34a08268b
Fix nullable processing in JSONFunctions 2021-10-07 02:26:50 +08:00
Amos Bird
a391b64f57
Revert "Merge pull request #29746 from azat/JSONExtract-Null-fix"
This reverts commit e990f35ba3, reversing
changes made to 8e03e0127a.
2021-10-07 02:26:32 +08:00
Azat Khuzhin
a62728c16e Mark 02046_low_cardinality_parallel_group_by as long 2021-10-06 21:11:59 +03:00
Filatenkov Artur
545673248a
Merge branch 'master' into add_CORS 2021-10-06 16:09:34 +03:00
kssenii
c96b403809 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into remote-connection 2021-10-06 11:54:28 +00:00
Filatenkov Artur
a9e8ba0c00
Correct behaviour with unknown methods (#29057)
* correct behaviour with unknown methods

* move check on earlier stage

* add test

* correct filter for handler

* Update HTTPServerConnection.cpp

* remove trying to get params

* correct filter for head requests

* Update HTTPHandlerFactory.h

* Update HTTPHandlerFactory.h

* Trigger Build
2021-10-06 14:43:05 +03:00
feng lv
c801fa65df fix and add new test
fix

fix
2021-10-06 10:56:42 +00:00
kssenii
5a87b6eb4f Predefined configuration for table function remote 2021-10-06 05:55:09 +00:00
Azat Khuzhin
ae5570e6d6 Improve parallel_view_processing test 2021-10-05 22:20:46 +03:00
Azat Khuzhin
342ec02664 Fix concurrent access to LowCardinality during GROUP BY (leads to SIGSEGV)
The problem is that GROUP BY can update saved_hash, which can be also
updated by subsequent update of a dictionary, and this will lead to
use-after-free.

You will find ASan report in `details`.

<details>

    ==24679==ERROR: AddressSanitizer: heap-use-after-free on address 0x604000615d20 at pc 0x000022cc8684 bp 0x7ffea6b5f850 sp 0x7ffea6b5f848
    READ of size 8 at 0x604000615d20 thread T223 (QueryPipelineEx)
        0 0x22cc8683 in DB::ReverseIndex<>::insert(StringRef const&) obj-x86_64-linux-gnu/../src/Columns/ReverseIndex.h
        1 0x22cc0de1 in COW<DB::IColumn>::mutable_ptr<DB::IColumn> DB::ColumnUnique<DB::ColumnString>::uniqueInsertRangeImpl<char8_t>()::'lambda'()::operator()() const obj-x86_64-linux-gnu/../src/Columns/ColumnUnique.h:540:39
        2 0x22cc0de1 in COW<DB::IColumn>::mutable_ptr<DB::IColumn> DB::ColumnUnique<DB::ColumnString>::uniqueInsertRangeImpl<char8_t>() obj-x86_64-linux-gnu/../src/Columns/ColumnUnique.h:570:23
        3 0x22cb9c66 in COW<DB::IColumn>::mutable_ptr<DB::IColumn> DB::ColumnUnique<DB::ColumnString>::uniqueInsertRangeFrom()::'lambda'(auto)::operator()<char8_t>(auto) const obj-x86_64-linux-gnu/../src/Columns/ColumnUnique.h:592:26
        4 0x22cb9c66 in DB::ColumnUnique<DB::ColumnString>::uniqueInsertRangeFrom() obj-x86_64-linux-gnu/../src/Columns/ColumnUnique.h:600:28
        5 0x2500b897 in DB::ColumnLowCardinality::insertRangeFrom() obj-x86_64-linux-gnu/../src/Columns/ColumnLowCardinality.cpp:205:62
        6 0x25a182f4 in DB::appendBlock(DB::Block const&, DB::Block&) obj-x86_64-linux-gnu/../src/Storages/StorageBuffer.cpp:470:23
        7 0x25a182f4 in DB::BufferSink::insertIntoBuffer(DB::Block const&, DB::StorageBuffer::Buffer&) obj-x86_64-linux-gnu/../src/Storages/StorageBuffer.cpp:634:9
        8 0x25a173cc in DB::BufferSink::consume(DB::Chunk) obj-x86_64-linux-gnu/../src/Storages/StorageBuffer.cpp:595:9
        9 0x26d1c997 in DB::SinkToStorage::transform(DB::Chunk&) obj-x86_64-linux-gnu/../src/Processors/Sinks/SinkToStorage.cpp:18:5

    0x604000615d20 is located 16 bytes inside of 40-byte region [0x604000615d10,0x604000615d38)
    freed by thread T37 (QueryPipelineEx) here:
        2 0x22cb9392 in boost::intrusive_ptr<DB::ColumnVector<unsigned long> >::~intrusive_ptr() obj-x86_64-linux-gnu/../contrib/boost/boost/smart_ptr/intrusive_ptr.hpp:98:23
        4 0x22cb9392 in COW<DB::IColumn>::mutable_ptr<DB::ColumnVector<unsigned long> >::operator=() obj-x86_64-linux-gnu/../src/Common/COW.h💯57
        5 0x22cb9392 in DB::ReverseIndex<>::tryGetSavedHash() const obj-x86_64-linux-gnu/../src/Columns/ReverseIndex.h:362:28
        6 0x22cb9392 in DB::ColumnUnique<DB::ColumnString>::tryGetSavedHash() const obj-x86_64-linux-gnu/../src/Columns/ColumnUnique.h:125:76
        7 0x242eaed3 in DB::ColumnsHashing::HashMethodSingleLowCardinalityColumn<>::HashMethodSingleLowCardinalityColumn() obj-x86_64-linux-gnu/../src/Common/ColumnsHashing.h:287:50
        8 0x242206c6 in void DB::Aggregator::executeImpl<>() const obj-x86_64-linux-gnu/../src/Interpreters/Aggregator.cpp:596:28
        9 0x24148e99 in DB::Aggregator::executeOnBlock() const obj-x86_64-linux-gnu/../src/Interpreters/Aggregator.cpp:1004:9
        10 0x26c24f3a in DB::AggregatingTransform::consume(DB::Chunk) obj-x86_64-linux-gnu/../src/Processors/Transforms/AggregatingTransform.cpp:539:33
        11 0x26c2054e in DB::AggregatingTransform::work() obj-x86_64-linux-gnu/../src/Processors/Transforms/AggregatingTransform.cpp:500:9

    previously allocated by thread T37 (QueryPipelineEx) here:
        0 0xb6d44fd in operator new(unsigned long) (/src/ch/tmp/upstream/clickhouse-asan+0xb6d44fd)
        1 0x11b78580 in COW<DB::IColumn>::mutable_ptr<> COWHelper<>::create<unsigned long&>(unsigned long&) (/src/ch/tmp/upstream/clickhouse-asan+0x11b78580)
        2 0x22cbf7b1 in DB::ReverseIndex<>::calcHashes() const obj-x86_64-linux-gnu/../src/Columns/ReverseIndex.h:472:17
        3 0x22cc2307 in DB::ReverseIndex<>::buildIndex() obj-x86_64-linux-gnu/../src/Columns/ReverseIndex.h:438:22
        4 0x22cc658c in DB::ReverseIndex<>::insert(StringRef const&) obj-x86_64-linux-gnu/../src/Columns/ReverseIndex.h:484:9
        5 0x22cc0de1 in COW<DB::IColumn>::mutable_ptr<DB::IColumn> DB::ColumnUnique<DB::ColumnString>::uniqueInsertRangeImpl<char8_t>()::'lambda'()::operator()() const obj-x86_64-linux-gnu/../src/Columns/ColumnUnique.h:540:39
        6 0x22cc0de1 in COW<DB::IColumn>::mutable_ptr<DB::IColumn> DB::ColumnUnique<DB::ColumnString>::uniqueInsertRangeImpl<char8_t>() obj-x86_64-linux-gnu/../src/Columns/ColumnUnique.h:570:23
        7 0x22cb9c66 in COW<DB::IColumn>::mutable_ptr<DB::IColumn> DB::ColumnUnique<DB::ColumnString>::uniqueInsertRangeFrom()::'lambda'(auto)::operator()<char8_t>(auto) const obj-x86_64-linux-gnu/../src/Columns/ColumnUnique.h:592:26
        8 0x22cb9c66 in DB::ColumnUnique<DB::ColumnString>::uniqueInsertRangeFrom() obj-x86_64-linux-gnu/../src/Columns/ColumnUnique.h:600:28
        9 0x2500b897 in DB::ColumnLowCardinality::insertRangeFrom() obj-x86_64-linux-gnu/../src/Columns/ColumnLowCardinality.cpp:205:62
        10 0x25a182f4 in DB::appendBlock(DB::Block const&, DB::Block&) obj-x86_64-linux-gnu/../src/Storages/StorageBuffer.cpp:470:23
        11 0x25a182f4 in DB::BufferSink::insertIntoBuffer(DB::Block const&, DB::StorageBuffer::Buffer&) obj-x86_64-linux-gnu/../src/Storages/StorageBuffer.cpp:634:9
        12 0x25a173cc in DB::BufferSink::consume(DB::Chunk) obj-x86_64-linux-gnu/../src/Storages/StorageBuffer.cpp:595:9
        13 0x26d1c997 in DB::SinkToStorage::transform(DB::Chunk&) obj-x86_64-linux-gnu/../src/Processors/Sinks/SinkToStorage.cpp:18:5

    SUMMARY: AddressSanitizer: heap-use-after-free obj-x86_64-linux-gnu/../src/Columns/ReverseIndex.h in DB::ReverseIndex<unsigned long, DB::ColumnString>::insert(StringRef const&)
    Shadow bytes around the buggy address:
      0x0c08800bab50: fa fa fd fd fd fd fd fa fa fa 00 00 00 00 00 00
      0x0c08800bab60: fa fa fd fd fd fd fd fa fa fa 00 00 00 00 00 fa
      0x0c08800bab70: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 00
      0x0c08800bab80: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fa
      0x0c08800bab90: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fd
    =>0x0c08800baba0: fa fa fd fd[fd]fd fd fa fa fa fd fd fd fd fd fa
      0x0c08800babb0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fa
      0x0c08800babc0: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fd
      0x0c08800babd0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fa
      0x0c08800babe0: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fd
      0x0c08800babf0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd
    Shadow byte legend (one shadow byte represents 8 application bytes):
      Addressable:           00
      Partially addressable: 01 02 03 04 05 06 07
      Heap left redzone:       fa
      Freed heap region:       fd
      Stack left redzone:      f1
      Stack mid redzone:       f2
      Stack right redzone:     f3
      Stack after return:      f5
      Stack use after scope:   f8
      Global redzone:          f9
      Global init order:       f6
      Poisoned by user:        f7
      Container overflow:      fc
      Array cookie:            ac
      Intra object redzone:    bb
      ASan internal:           fe
      Left alloca redzone:     ca
      Right alloca redzone:    cb
    ==24679==ABORTING

</details>
2021-10-05 21:07:10 +03:00
Filatenkov Artur
60d84df56a
Merge branch 'ClickHouse:master' into add_CORS 2021-10-05 17:27:13 +03:00
Vitaly Baranov
9ff8a2391d Add test. 2021-10-05 11:30:27 +03:00
feng lv
86d31445fd Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into filelog-engine 2021-10-05 03:58:27 +00:00
Alexander Tokmakov
bb32432943 more fixes 2021-10-05 00:13:18 +03:00
Azat Khuzhin
20e706766c Forbid Nullable for JSONExtract* (JSONExtract() still supports Nullable)
Only JSONExtract() can support Nullable, others JSONExtract*
(JSONExtractString and similar) does not.

And right now this file is pretty complex already,
so adding support of Nullable for others will make it even more complex.

CI: https://clickhouse-test-reports.s3.yandex.net/29680/d0fc26f91a0141b56a0550741219c3dc43630e03/fuzzer_ubsan/report.html#fail1
2021-10-04 21:08:02 +03:00
Maksim Kita
3fe9fdac96 Added function ngram 2021-10-04 18:53:17 +03:00
Kruglov Pavel
ab7c8e7074
Delete temporary file 2021-10-04 18:25:49 +03:00
avogar
2523053b27 Remove code duplication, fix bug, add more tests 2021-10-04 18:22:06 +03:00
Nikolai Kochetov
122d39cbba
Fix missing condition in pushed down predicate. (#29625) 2021-10-04 17:50:03 +03:00
Nikolay Degterinsky
e03bf0c526 Merge branch 'master' into query_parameters 2021-10-04 17:23:17 +03:00
Pavel Kruglov
82d17870f1 Avoid division by zero when denominator is Nullable 2021-10-04 16:44:38 +03:00
Anton Popov
362e84a336
Merge pull request #29429 from Enmk/Governance/database_comment
Implemented creating databases with comments
2021-10-04 15:12:33 +03:00
Nikolay Degterinsky
345ac59f46
Merge pull request #29552 from MaxWk/conversion-between-date32-and-datetime64
Support conversion between date32 and datetime64
2021-10-04 12:43:56 +03:00
Filatenkov Artur
8df228e6b8
Merge branch 'master' into add_CORS 2021-10-04 10:55:09 +03:00
Maksim Kita
25d1588d0a
Merge pull request #29666 from kitaisreal/user-defined-executable-functions-added-implicit-cast
UserDefinedExecutableFunctions added implicit cast
2021-10-04 10:34:31 +03:00
Kseniia Sumarokova
5ab17d795f
Merge pull request #29673 from ClickHouse/url-fix-initialization
Fix initialization of `StorageURLSource`
2021-10-04 10:23:52 +03:00
alexey-milovidov
325a01f798
Merge pull request #29553 from azat/group-by-with-totals-having-fix
Fix null deference for GROUP BY WITH TOTALS HAVING (when the column from HAVING wasn't selected)
2021-10-04 09:25:35 +03:00
feng lv
8a4092c55b Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into filelog-engine 2021-10-03 10:00:16 +00:00
feng lv
3a56cc5141 fix
update test
2021-10-03 09:49:11 +00:00
alexey-milovidov
d822ba1f3b
Merge pull request #25262 from ClickHouse/add-test-21592
Add a test for #21592
2021-10-03 12:09:28 +03:00
alexey-milovidov
35ef7266db
Merge pull request #25252 from ClickHouse/add-test-24261
Add a test for #24261
2021-10-03 12:09:16 +03:00
alexey-milovidov
ac57e057a1
Merge pull request #23028 from ClickHouse/cast_to_value_or_default
Merging #21330
2021-10-03 11:00:48 +03:00
Alexey Milovidov
345d4bf48c Update test 2021-10-03 08:01:51 +03:00
mergify[bot]
644b3ffe38
Merge branch 'master' into add-test-24261 2021-10-03 04:51:37 +00:00
mergify[bot]
cb65a0a592
Merge branch 'master' into add-test-21592 2021-10-03 04:51:35 +00:00
Alexey Milovidov
e3e23f0923 Add a test 2021-10-03 07:49:06 +03:00
Alexey Milovidov
b63b8d5446 Add a test 2021-10-03 01:02:36 +03:00
Maksim Kita
71ed20f656 UserDefinedExecutableFunctions added implicit cast 2021-10-02 23:29:09 +03:00
Anton Popov
b64bbb54aa
Merge pull request #29203 from CurtizJ/fix-ubsan
Fix integer underflow in function `quantile`
2021-10-02 20:36:53 +03:00
Maksim Kita
ad6d143303
Merge pull request #29574 from kitaisreal/jit-fix-short-circuit-with-alias
ExpressionJIT fix short-circuit with alias
2021-10-01 21:18:31 +03:00
Maksim Kita
a58cc620e9 Map get non const key added test 2021-10-01 17:54:40 +03:00
feng lv
9c1dcf41b8 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into filelog-engine 2021-10-01 14:47:21 +00:00
Maksim Kita
26b8d4c480 Fixed test 2021-10-01 17:10:28 +03:00
vdimir
7444d64156
Fix for recursive tuples in MergeTreeWhereOptimizer 2021-10-01 17:01:03 +03:00
vdimir
23ce41e3bb
MergeTreeWhereOptimizer supports constant tuple in both sides of equals 2021-10-01 17:01:03 +03:00
vdimir
64ffacd9e0
MergeTreeWhereOptimizer::tryAnalyzeTuple, fix fuzz 2021-10-01 17:01:02 +03:00
凌涛
f1e4af5a22
use force_index_by_date and force_primary_key for tests 2021-10-01 17:01:01 +03:00
凌涛
f660224a5f
add tests 2021-10-01 17:01:01 +03:00
Vladimir C
ec966b7df5
Merge pull request #27933 from mathalex/numeric_tuple_functions 2021-10-01 16:18:52 +03:00
vdimir
5852329288
Check multiple using in CrossToInnerJoinVisitor 2021-10-01 14:52:12 +03:00
Viachaslau Boben
5d40471ea3
Fix cross to inner join using error 2021-10-01 14:52:11 +03:00
Filatenkov Artur
8959b348a1
Merge branch 'ClickHouse:master' into add_CORS 2021-10-01 14:42:46 +03:00
Maksim Kita
30220529b7
Merge pull request #29573 from ClickHouse/fix_segfault_in_add_database_visitor
Fix nullpointer dereference in AddDefaultDatabaseVisitor
2021-10-01 12:44:15 +03:00
Maksim Kita
b8702e613d Fixed tests 2021-10-01 12:37:04 +03:00
alexey-milovidov
b29e877f26
Merge pull request #29182 from ClickHouse/yandex-to-clickhouse-in-configs
Replace `<yandex>` to `<clickhouse>` in configs and more.
2021-10-01 12:24:12 +03:00
Vasily Nemkov
2f16806cd0 Implemented creating databases with comments 2021-10-01 11:51:26 +03:00
Nikita Tikhomirov
5de80a057f Added EOL to the end of the test file 02041_openssl_hash_functions_test. 2021-10-01 07:37:59 +03:00
Nikita Tikhomirov
cb7e373bfe Disable fasttest for 02041_openssl_hash_functions_test test. 2021-10-01 07:22:20 +03:00
Nikita Tikhomirov
a49d4d3092 Added tests for OpenSSL hash functions. 2021-10-01 06:23:35 +03:00
Alexey Milovidov
4271f8c738 Merge remote-tracking branch 'origin/master' into yandex-to-clickhouse-in-configs 2021-10-01 01:33:58 +03:00
Maksim Kita
42e37f4fad Added test 2021-09-30 21:20:15 +03:00
Kseniia Sumarokova
3457868f3d
Merge pull request #26231 from kssenii/interactive-mode-for-clickhouse-local
clickhouse-local interactive mode, merge clickhouse-client and clickhouse-local code
2021-09-30 19:31:34 +03:00
feng lv
1d0f099316 update test 2021-09-30 16:22:26 +00:00
feng lv
ee02e52d3d Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into filelog-engine 2021-09-30 16:02:31 +00:00
alesapin
f31c35de48 Fix nullpointer dereference in AddDefaultDatabaseVisitor 2021-09-30 18:56:55 +03:00
Alexey Milovidov
551c52c236 Merge remote-tracking branch 'origin/master' into yandex-to-clickhouse-in-configs 2021-09-30 17:45:14 +03:00
Nikolai Kochetov
bc91d7ea60 Fix crash. 2021-09-30 16:48:04 +03:00
Maksim Kita
6077d2e1c7 Fixed test with dictGet without database name as column default value 2021-09-30 16:19:20 +03:00
vdimir
4acd8f3147
Do not add extra parentheses for tuple negate unary operator 2021-09-30 13:47:29 +03:00
Raúl Marín
e53a48fb30 Raise lock acquire timeout for the test
Needed for check test under ASAN
2021-09-30 11:05:20 +02:00
Nikolay Degterinsky
485e19ff84
Merge pull request #28955 from anneji-dev/alterTable
Add default database for alter table
2021-09-30 11:28:47 +03:00
Nikolai Kochetov
a68a86a230
Merge pull request #29539 from FArthur-cmd/fix_test_names
Fix test names
2021-09-30 11:17:49 +03:00
Azat Khuzhin
032bb55a01 Fix null deference for GROUP BY WITH TOTALS HAVING (when the column from HAVING wasn't selected)
Found by UBsan fuzzer [1].

  [1]: https://clickhouse-test-reports.s3.yandex.net/29503/a4f2663b8209e0e75021d8b84f932bc162c81857/fuzzer_ubsan/report.html#fail1
2021-09-30 10:21:29 +03:00
MaxWk
3cbabe2c68 support conversion between date32 and datetime64 2021-09-30 15:09:36 +08:00
Nikolay Degterinsky
7f3d395bf3 Merge branch 'master' into query_parameters 2021-09-30 02:01:33 +03:00
Alexey Boykov
192633cb9b
Merge branch 'ClickHouse:master' into numeric_tuple_functions 2021-09-30 01:37:37 +03:00
kssenii
2c005db9ad Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into interactive-mode-for-clickhouse-local 2021-09-29 17:45:15 +00:00
Raúl Marín
66bb857a1a Add test for JOIN engine deadlock 2021-09-29 19:11:38 +02:00
Alexander Tokmakov
b702f7cbff preserve table alias when adding default database 2021-09-29 19:51:42 +03:00
Filatenkov Artur
a371a22f16
Update 02010_lc_native.sh 2021-09-29 19:07:40 +03:00
Filatenkov Artur
90c8f50330
Update 02020_alter_table_modify_comment.reference 2021-09-29 19:07:10 +03:00
Maksim Kita
a5151fb49b Function accurateCastOrDefault updated implementation 2021-09-29 17:52:08 +03:00
Artur Filatenkov
3fb07ddb48 delete old 2021-09-29 17:46:37 +03:00
Artur Filatenkov
6a3cb0d9ea rename tests 2021-09-29 17:43:35 +03:00
mergify[bot]
6a2ac6e871
Merge branch 'master' into yandex-to-clickhouse-in-configs 2021-09-29 13:29:08 +00:00
Vitaly Baranov
0c33f1121b
Merge pull request #28012 from amosbird/jsonextractstring2
Handle null column correctly in JSONFunction.
2021-09-29 14:58:40 +03:00
Kruglov Pavel
14be2f31f5
Merge pull request #29475 from ClickHouse/fix-29010
Remove filter column from HAVING when it is not needed.
2021-09-29 13:03:27 +03:00
Vladimir C
27f0f9fcf3
Merge pull request #21320 from arenadata/ADQM-138 2021-09-29 11:53:54 +03:00
alexey-milovidov
be427555e5
Merge pull request #29476 from ClickHouse/fix_29456
Fix table name escaping in Lazy database
2021-09-29 02:45:40 +03:00
alexey-milovidov
c37932a0b7
Merge pull request #29461 from azat/fix-2024_merge_regexp_assert
Fix 2024_merge_regexp_assert
2021-09-29 00:57:11 +03:00
alexey-milovidov
d46dfd0ddd
Merge pull request #29446 from azat/isNull-isNotNull-format
Transform isNull/isNotNull to IS NULL/IS NOT NULL (for external dbs)
2021-09-29 00:56:57 +03:00
alexey-milovidov
0965f9f3c4
Merge pull request #29453 from azat/tests-enable-memory-profiler
Enable memory profiler on CI
2021-09-29 00:56:42 +03:00
alexey-milovidov
f6db7552b6
Merge pull request #29444 from CurtizJ/fix-deadlock-async-inserts
Fix deadlock in concurrent async inserts and truncates
2021-09-29 00:56:29 +03:00
Anton Popov
5f3b7c8c0a fix test 2021-09-28 22:56:51 +03:00
Maksim Kita
0279afa738
Merge pull request #29474 from kitaisreal/bloom-filter-indexes-updated-tests
Bloom filter indexes updated tests
2021-09-28 22:40:27 +03:00
Maksim Kita
9ecd0a3f4f
Merge pull request #29220 from ClickHouse/full-text-bloom-filter-index-map-data-type
Merging #28511
2021-09-28 22:40:17 +03:00
Alexander Tokmakov
d120fdf595 check if query context exist before using cache 2021-09-28 21:42:41 +03:00
alexey-milovidov
1e6f9ac635
Merge branch 'master' into yandex-to-clickhouse-in-configs 2021-09-28 20:26:44 +03:00
Anton Popov
83fd853169 Merge remote-tracking branch 'upstream/master' into HEAD 2021-09-28 15:03:27 +03:00
Ilya Golshtein
d67bc0bef4 minor fixes in ORs in JOIN 2021-09-28 14:11:33 +03:00
Ilya Golshtein
7ebc16c1b3 get rid of DNF and related features in ORs in JOIN 2021-09-28 14:11:33 +03:00
Ilya Golshtein
626bfdf23c compatible filter conditions, fixes and new tests in ORs in JOIN 2021-09-28 14:11:33 +03:00
Ilya Golshtein
bbd548e81d bypass filer conditions in DNF in ORs in JOIN (part 2) 2021-09-28 14:11:33 +03:00
Ilya Golshtein
336b2a4c68 bypass filer conditions in DNF in ORs in JOIN (part 1) 2021-09-28 14:11:33 +03:00
vdimir
760a92c490 Do not allow in optimizeClauses conditions for different table joined via OR 2021-09-28 14:11:32 +03:00
Ilya Golshtein
17e6cfbefb DNF bugfix in ORs in JOIN 2021-09-28 14:11:32 +03:00
Ilya Golshtein
6daef66364 MAX_DISJUNCTS instead of MAX_ORS in ORs in JOIN 2021-09-28 14:11:32 +03:00
Ilya Golshtein
78ad6bf529 MAX_ORS, checkStackSize and beautification per review in ORs in JOIN 2021-09-28 14:11:32 +03:00
Ilya Golshtein
8057e052a6 crash fix, style fixes, ASTs moved out of TableJoin in ORs in JOIN 2021-09-28 14:11:32 +03:00
Ilya Golshtein
4c043a0157 necessary test changes for optimizeDisjuncts in ORs in JOIN 2021-09-28 14:11:32 +03:00
vdimir
3b35ab6e8c Not implemented for asof and auto join with multiple ORs 2021-09-28 14:11:31 +03:00
vdimir
212ba1b64f Add join_on_or_long.sql 2021-09-28 14:11:31 +03:00
Ilya Golshtein
8339cfc8e1 split long lasting tests for JOINs 2021-09-28 14:11:31 +03:00
Ilya Golshtein
5ed6b26c9d any_join_distinct_right_table_keys tests and fix for ORs in JOIN 2021-09-28 14:11:30 +03:00
vdimir
c7b93e3324 Fix non deterministic behaviour in join_or_all/any tests 2021-09-28 14:11:30 +03:00
vdimir
fc6b8ed655 Test join_use_nulls in 01881_join_on_conditions 2021-09-28 14:11:30 +03:00
Ilya Golshtein
68d6a0ee85 prohibit storage join if ORs 2021-09-28 14:11:29 +03:00
Ilya Golshtein
b03415bd0e Fixed other bug if OR together with filter conditions 2021-09-28 14:11:29 +03:00
Ilya Golshtein
f94b2cba2d Fixed bug if OR together with filter conditions, some comments 2021-09-28 14:11:29 +03:00
Ilya Golshtein
634eb2a0a7 no errors on OR in join_on_conditions test 2021-09-28 14:11:29 +03:00
Ilya Golshtein
c0ad89016a attempt to set initial memory usage in comma_join_in test 2021-09-28 14:11:28 +03:00
Ilya Golshtein
ba8d91245c ORs in JOINs tests 2021-09-28 14:11:28 +03:00
Maksim Kita
1e5e93830b Merge branch 'master' into cast_to_value_or_default 2021-09-28 14:04:10 +03:00
Viachaslau Boben
762904adbd Add nfd and perf test 2021-09-28 13:42:37 +03:00
Alexander Tokmakov
462088f500 fix table name escaping 2021-09-28 13:14:05 +03:00
Maksim Kita
cd1e72e312
Merge pull request #29454 from Avogar/fix-least-greatest
Fix logical error in functions greatest/least
2021-09-28 13:13:30 +03:00
Maksim Kita
8eaff1a02d
Merge pull request #29460 from den-crane/test/issue_23634
test for #23634 added tests for tuples
2021-09-28 12:55:13 +03:00
Maksim Kita
f2402e1a10 Fixed tests 2021-09-28 12:52:07 +03:00
Amos Bird
cfd8df0895
disable fasttest 2021-09-28 17:46:46 +08:00
Nikolai Kochetov
09cd955aa6 Remove filter column from HAVING when it is not needed. 2021-09-28 12:46:34 +03:00
Maksim Kita
71fb9e6059 Bloom filter indexes updated tests 2021-09-28 12:38:27 +03:00
alesapin
ec26768dce Temporary remove 01200_mutations_memory_consumption 2021-09-28 10:49:06 +03:00
Azat Khuzhin
d6cd057e2c Rename 2024_merge_regexp_assert to 02024_merge_regexp_assert 2021-09-28 09:05:57 +03:00
Azat Khuzhin
8163b3f7f6 Fix 2024_merge_regexp_assert 2021-09-28 09:05:36 +03:00
anneji-dev
7c69f9c821
Update tests/queries/0_stateless/02028_add_default_database_for_alterquery_on_cluster.sql
Co-authored-by: Nikolay Degterinsky <43110995+evillique@users.noreply.github.com>
2021-09-28 11:41:03 +08:00
Amos Bird
07a278e426
Better 2021-09-28 11:38:29 +08:00
Amos Bird
540956112d
skip fasttest 2021-09-28 11:38:29 +08:00
Amos Bird
b25c3fb659
Handle null column correctly in JSONFunction 2021-09-28 11:38:29 +08:00
feng lv
ef5c71a9ab Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into filelog-engine 2021-09-28 02:06:28 +00:00
feng lv
df96b3e656 fix test 2021-09-28 02:06:16 +00:00
Denis Zhuravlev
108b76e650 added tests for tuples 2021-09-27 20:42:11 -03:00
alexey-milovidov
995913e89c
Merge branch 'master' into yandex-to-clickhouse-in-configs 2021-09-28 02:27:36 +03:00
tavplubix
15e80ead3f
Merge pull request #29445 from ClickHouse/tavplubix-patch-3
Fix flaky test 01158_zookeeper_log_long
2021-09-27 23:50:48 +03:00
Pavel Kruglov
cc40e36514 Fix logical error in function greatest/least 2021-09-27 23:13:01 +03:00
Azat Khuzhin
9eb400bc16 Fix 01656_test_query_log_factories_info flakiness 2021-09-27 22:31:48 +03:00
Azat Khuzhin
e44ade9281 Update test references in 01293_show_settings 2021-09-27 22:31:36 +03:00
Azat Khuzhin
2378491c04 Transform isNull/isNotNull to IS NULL/IS NOT NULL (for external dbs)
This is required to support queries (like `foo IS NULL`) to external
databases (i.e. MySQL).

This patch had been submitted separately, due to:
- avoid mixing patches
- run CI (and update tests references)
2021-09-27 22:24:09 +03:00
alexey-milovidov
2902f52e1b
Merge pull request #29392 from den-crane/test/issue_23634
test for #23634 ( nullable PK and negate cond )
2021-09-27 22:20:42 +03:00
Maksim Kita
d4e19190ea
Merge pull request #29443 from kitaisreal/dictionary-view-different-databases-added-test
Dictionary view different database added test
2021-09-27 22:04:05 +03:00
Maksim Kita
7861c26eaf
Merge pull request #29431 from kitaisreal/map-bloom-filter-index-map-values-equals-support
Map bloom filter index mapValues equals function support
2021-09-27 22:03:53 +03:00
Maksim Kita
342756fe00
Merge pull request #29432 from kitaisreal/dictionary-array-nested-map-added-test
Dictionary Array nested Map added test
2021-09-27 21:55:28 +03:00
Nikolai Kochetov
236d71ea94
Merge pull request #28582 from ClickHouse/rewrite-pushing-to-views
Rewrite PushingToViews
2021-09-27 21:19:11 +03:00
tavplubix
23d899fb60
Update 01158_zookeeper_log_long.sql 2021-09-27 19:54:59 +03:00
Anton Popov
9a58e4a8ba fix deadlock in concurrent async inserts and truncates 2021-09-27 19:39:32 +03:00
Maksim Kita
17f1a3910b Fixed test 2021-09-27 19:20:58 +03:00
Maksim Kita
2b8931523f Dictionary view different database added test 2021-09-27 19:19:38 +03:00
Viachaslau Boben
b3325772f7 Add normalizeUTF8 function with NFC normalization 2021-09-27 18:47:43 +03:00
tavplubix
e9749b0027
Merge pull request #29323 from ClickHouse/fix_assertion_ddl_dependency
Fix assertion in DDLDependencyVisitor
2021-09-27 18:06:32 +03:00
alesapin
ddd80c8e72
Merge pull request #29264 from Enmk/governance/table_comment_update
Implemented modifying table comments with `ALTER TABLE t MODIFY COMMENT 'value'`
2021-09-27 18:02:14 +03:00
Maksim Kita
e290f19957 Merge branch 'master' into full-text-bloom-filter-index-map-data-type 2021-09-27 17:50:07 +03:00
Maksim Kita
bd499e5b7d Dictionary Array nested Map added test 2021-09-27 17:44:34 +03:00
Maksim Kita
b28d6e76cc Map bloom filter full text index added support for mapKeys, mapValues 2021-09-27 17:26:25 +03:00
Maksim Kita
cd9c796e6f Map bloom filter index mapValues equals function support 2021-09-27 17:23:56 +03:00
Nikita Mikhaylov
3741b8a17e
Merge pull request #29337 from amosbird/projection-fix18
Fix projection merges and mutations.
2021-09-27 13:45:13 +03:00
Kevin Michel
14b1c438cc
Enable all tests using ATTACH/FETCH on Replicated database 2021-09-27 10:10:46 +02:00
Nikolai Kochetov
78a7665f43 Merge branch 'master' into rewrite-pushing-to-views 2021-09-27 10:56:50 +03:00
alexey-milovidov
5a7f30171a
Merge pull request #29355 from ClickHouse/remove-trash-db-regexp
Fix assert in table function `merge` with database regexp
2021-09-27 05:50:13 +03:00
alexey-milovidov
319e0c1f91
Merge pull request #29229 from azat/send-UNKNOWN_DATABASE-to-client
Send UNKNOWN_DATABASE to the client (via TCP)
2021-09-27 02:46:01 +03:00
Alexey Milovidov
8493b014cd Improve test 2021-09-27 02:16:58 +03:00
Alexey Milovidov
16f0f0af7f Merge remote-tracking branch 'origin/master' into remove-trash-db-regexp 2021-09-27 02:12:13 +03:00
mergify[bot]
64669a28ce
Merge branch 'master' into yandex-to-clickhouse-in-configs 2021-09-26 22:59:23 +00:00
alexey-milovidov
1c1e2e6b28
Merge pull request #29289 from vdimir/issue-29227-rocksdb-truncate
Fix race in StorageSystemRocksDB
2021-09-27 01:55:07 +03:00
Azat Khuzhin
b3d1bfc67a Send UNKNOWN_DATABASE to the client (via TCP)
Before this patch:

    $ clickhouse-client --database foo -q 'select 1'
    Code: 32. DB::Exception: Attempt to read after eof: while receiving packet from localhost:9000. (ATTEMPT_TO_READ_AFTER_EOF)

After:

    $ clickhouse-client --database foo -q 'select 1'
    Received exception from server (version 21.11.1):
    Code: 81. DB::Exception: Received from localhost:9000. DB::Exception: Database foo doesn't exist. (UNKNOWN_DATABASE)
    (query: select 1)

Fixes: #26864 (cc @vitlibar)
2021-09-26 23:45:29 +03:00
Denis Zhuravlev
e06115d77f test for #23634 2021-09-26 17:24:05 -03:00
alexey-milovidov
aa48698613
Merge pull request #29368 from bharatnc/ncb/fix-name-h3isResClassIII
Fix H3 function name (h3ResIsClassIII to h3IsResClassIII)
2021-09-26 20:36:36 +03:00
feng lv
da2c8f23cc Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into filelog-engine 2021-09-26 15:00:37 +00:00
feng lv
6c4b0f2d37 drop table immediately
fix style

update
2021-09-26 14:13:12 +00:00
feng lv
f8f22f9a51 fix test 2021-09-26 13:07:31 +00:00
feng lv
a1e61ebedf udpate tests 2021-09-26 12:21:20 +00:00
Anton Popov
01757a85a7
temporarily fix tests 2021-09-26 14:59:39 +03:00
Anton Popov
332a2ac990
temporarily fix tests 2021-09-26 14:58:55 +03:00
feng lv
7af96b12b1 add meta file
fix and update tests
2021-09-26 11:28:46 +00:00
alexey-milovidov
07eef92c16
Merge pull request #29364 from azat/benchmark-fix-query_id
Pass through initial query_id for clickhouse-benchmark
2021-09-26 03:27:27 +03:00
mergify[bot]
15e5204a7c
Merge branch 'master' into issue-29227-rocksdb-truncate 2021-09-26 00:10:30 +00:00
bharatnc
cd17849607 fix test - rename reference file 2021-09-25 13:11:23 -07:00
bharatnc
59dfc87113 Merge remote-tracking branch 'upstream/master' into ncb/fix-name-h3isResClassIII 2021-09-25 10:19:00 -07:00
bharatnc
79473f2edc Fix tests 2021-09-25 10:13:42 -07:00
alexey-milovidov
e4363872ca
Merge branch 'master' into yandex-to-clickhouse-in-configs 2021-09-25 19:58:36 +03:00
alexey-milovidov
87d9506bb0
Merge pull request #29348 from ClickHouse/remove-nth-value
Remove window function 'nth_value'
2021-09-25 19:43:02 +03:00
Azat Khuzhin
fb584715e1 Pass through initial query_id for clickhouse-benchmark 2021-09-25 18:05:55 +03:00
kssenii
2129230b1e Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into interactive-mode-for-clickhouse-local 2021-09-25 09:16:05 +00:00
kssenii
f3784780fd Fixes 2021-09-25 08:46:57 +00:00
Amos Bird
3022092a36
Make long test no parallel 2021-09-25 16:16:43 +08:00
Kseniia Sumarokova
9f1dea9acb
Merge pull request #29325 from lingtaolf/feature/add-query-option
Clickhouse-format support option '--query'
2021-09-25 11:02:23 +03:00
Alexey Milovidov
fe44be522e Fix assert in table function merge with database regexp 2021-09-25 05:48:24 +03:00
Alexey Milovidov
06fc466438 Remove window function 'nth_value' 2021-09-25 04:39:38 +03:00
Alexey Milovidov
82d57c6e47 Merge branch 'master' into yandex-to-clickhouse-in-configs 2021-09-25 01:38:39 +03:00
Maksim Kita
830eae6d1f
Merge pull request #29310 from kitaisreal/parser-number-binary-literal-update
Parser number binary literal update
2021-09-25 01:35:22 +03:00
凌涛
08983e432b clickhouse-format support option --query 2021-09-25 00:34:33 +08:00
Amos Bird
23d3d894e6
Fix projection merges and mutations. 2021-09-24 22:45:50 +08:00
Filatenkov Artur
aaf6785359
Merge branch 'ClickHouse:master' into add_CORS 2021-09-24 15:40:37 +03:00
Vladimir C
908ae1dc12
Merge pull request #29075 from vdimir/quantile-overflow 2021-09-24 15:03:15 +03:00
Alexander Tokmakov
165765659d fix assertion in DDLDependencyVisitor 2021-09-24 13:22:22 +03:00
Vasily Nemkov
1d20014d5d Fixed clang12 build and updated tests 2021-09-24 13:11:00 +03:00
vdimir
152942aedf
Update 02029_quantile_sanitizer.sql 2021-09-24 13:08:46 +03:00
vdimir
241e66cd2d
Add new test 02029_quantile_sanitizer, restore 01779_quantile_deterministic_msan 2021-09-24 13:08:46 +03:00
vdimir
58a756da9e
Handle overflow in quantileTDigest 2021-09-24 13:08:45 +03:00
Nikolai Kochetov
e617aeb7a5
Merge pull request #29139 from amosbird/projection-fix17
Disable projections when ARRAY JOIN is used.
2021-09-24 11:15:23 +03:00
feng lv
9456c67486 fix
fix test

fix

fix

fix

exception handle
2021-09-24 02:59:47 +00:00
bharatnc
52289fa41e Merge remote-tracking branch 'upstream/master' into ncb/complete-h3-inspection-funcs 2021-09-23 14:51:13 -07:00
Maksim Kita
5047e1a452 Parser number binary literal update 2021-09-24 00:35:41 +03:00
Maksim Kita
1ebb49d939 Revert parse number binary literal 2021-09-24 00:23:15 +03:00
bharatnc
de65461158 Merge remote-tracking branch 'upstream/master' into ncb/complete-h3-inspection-funcs 2021-09-23 13:44:36 -07:00
Maksim Kita
d766fc47c4 Updated tests 2021-09-23 20:54:35 +03:00
alexey-milovidov
b8083929a6
Merge branch 'master' into yandex-to-clickhouse-in-configs 2021-09-23 20:49:40 +03:00
bharatnc
f02d81be24 Merge remote-tracking branch 'upstream/master' into ncb/complete-h3-inspection-funcs 2021-09-23 08:59:39 -07:00
vdimir
9af2e4891d
Cleanup test rocksdb_race_long.sh 2021-09-23 16:19:39 +03:00
Alexey Boykov
e0963c7666 Cosine null fix 2021-09-23 15:54:00 +03:00
vdimir
1bb48cbe72
Add test for segfault in StorageEmbeddedRocksDB, issue #29227 2021-09-23 13:54:12 +03:00
Nikolai Kochetov
28d1938ac4 Remote 01200_mutations_memory_consumption from fast 2021-09-23 13:44:00 +03:00
Nikolai Kochetov
998d29ebc7 Merge branch 'master' into rewrite-pushing-to-views 2021-09-23 13:10:27 +03:00
Kruglov Pavel
6461391387
Merge pull request #29077 from Avogar/fix-msgpack
Improve MsgPack input/output format
2021-09-23 12:46:36 +03:00
Maksim Kita
3d79812427 Merge branch 'master' into full-text-bloom-filter-index-map-data-type 2021-09-23 12:38:03 +03:00
Maksim Kita
0341b99c69
Merge pull request #29280 from kitaisreal/full-text-bloom-filter-added-support-for-array-data-type
FullText bloom filter index added support for Array data type
2021-09-23 12:34:06 +03:00
Vasily Nemkov
3b762f10a0 Fixed test 2021-09-23 10:31:59 +03:00
anneji-dev
34055d38c2
Update tests/queries/0_stateless/02028_add_default_database_for_alterquery_on_cluster.sql
Co-authored-by: Nikolay Degterinsky <43110995+evillique@users.noreply.github.com>
2021-09-23 11:23:55 +08:00
Maksim Kita
ebbefd49c3 FullText bloom filter index added support for Array data type 2021-09-23 02:06:54 +03:00
Vasily Nemkov
cb1ca9b33e Implemented modifying table comments with ALTER TABLE t MODIFY COMMENT 'value' 2021-09-23 01:14:00 +03:00
Maksim Kita
d5a7e92b97 Bloom filter map added support for has function 2021-09-23 01:10:14 +03:00
Maksim Kita
1bf375e2b7
Merge pull request #29254 from kitaisreal/map-bloom-filter-index-updated
Updated bloom filter index for map type to work with mapKeys, mapValues functions
2021-09-23 00:31:14 +03:00
Maksim Kita
2920e124f3
Merge pull request #29267 from kitaisreal/function-has-support-map-type
Function has support map type
2021-09-23 00:26:58 +03:00
kssenii
ec24a8f114 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into interactive-mode-for-clickhouse-local 2021-09-22 20:46:49 +00:00
Maksim Kita
7eca0a1486
Merge pull request #29258 from vdimir/fuse-quantileBFloat16Weighted
Add NameQuantileBFloat16Weighted to GatherFunctionQuantileVisitor
2021-09-22 20:38:55 +03:00
Maksim Kita
6dc41ad653 Fixed tests 2021-09-22 20:31:49 +03:00
Maksim Kita
93208fca4b Bloom filter for map data type dded support for IN, mapContains functions 2021-09-22 20:25:10 +03:00
Filatenkov Artur
1fe4555dec
Merge branch 'ClickHouse:master' into add_CORS 2021-09-22 19:55:15 +03:00
Maksim Kita
c73808615b Function has support map type 2021-09-22 19:08:08 +03:00
tavplubix
ba82781e11
Merge pull request #29061 from ClickHouse/remove_some_trash
Fix `system.distributed_ddl_queue`
2021-09-22 16:58:29 +03:00
vdimir
eb1053d931
Add NameQuantileBFloat16Weighted to GatherFunctionQuantileVisitor 2021-09-22 15:53:39 +03:00
Artur
2cffa98a60 add test and comments in config 2021-09-22 12:22:21 +00:00
Nikolay Degterinsky
1b1d90deb8 Merge branch 'master' into query_parameters 2021-09-22 13:53:56 +03:00
mergify[bot]
627a4fea96
Merge branch 'master' into fix-msgpack 2021-09-22 10:14:18 +00:00
Maksim Kita
3b505a15e2 Updated test 2021-09-22 12:48:34 +03:00
Maksim Kita
92fd6b376f Updated bloom filter index for map type to work with mapKeys function 2021-09-22 12:45:48 +03:00
feng lv
f637f4f2d1 remove unused variable
update test

update
2021-09-22 07:24:18 +00:00
bharatnc
4a3504a84c Fix tests 2021-09-21 23:07:12 -07:00
feng lv
dfdf756b6a Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into filelog-engine 2021-09-22 02:51:51 +00:00
bharatnc
8336847be6 Merge remote-tracking branch 'upstream/master' into ncb/complete-h3-inspection-funcs 2021-09-21 17:43:47 -07:00
bharatnc
208dfc998a H3 - fix logic to return icosahedron faces 2021-09-21 17:39:59 -07:00
Alexey Milovidov
4ade6cc5da Merge remote-tracking branch 'origin/master' into yandex-to-clickhouse-in-configs 2021-09-22 02:08:29 +03:00
bharatnc
eb118a09ab H3 - add tests for h3GetFaces 2021-09-21 14:11:02 -07:00
alexey-milovidov
3203fa4c34
Merge pull request #28914 from ClickHouse/exp-smooth
Add aggregate function for exponential smoothing
2021-09-21 23:52:44 +03:00
alexey-milovidov
0880ae2883
Merge branch 'master' into yandex-to-clickhouse-in-configs 2021-09-21 20:17:28 +03:00
feng lv
e3fa2e3634 fix
fix

update tests

update tests
2021-09-21 16:53:24 +00:00
Maksim Kita
6dadc521fb MergeTreeIndexFullText updated for data type map 2021-09-21 16:55:48 +03:00
凌涛
32df36abb4 add tests 2021-09-21 16:55:07 +03:00
Anton Popov
ea4fd19e28
Merge pull request #29087 from CurtizJ/asyn-inserts-follow-up
Minor enhancements in async inserts
2021-09-21 13:38:52 +03:00
Vladimir C
bc7c41efff
Merge pull request #26657 from hexiaoting/fuse_quantile 2021-09-21 12:33:07 +03:00
Vladimir C
9abd8aea6d
Merge pull request #29123 from depressed-pho/csv-custom-null 2021-09-21 11:35:21 +03:00
bharatnc
93e3fe9db1 H3 - tests for h3ResIsClassIII func 2021-09-20 23:34:04 -07:00
bharatnc
772f7c9322 H3 - tests for h3IsPentagon func 2021-09-20 23:19:46 -07:00
Anton Popov
c48a93a62f fix integer underflow in function 'quantile' 2021-09-20 21:21:40 +03:00
Anton Popov
83e45adad6 Merge remote-tracking branch 'upstream/master' into HEAD 2021-09-20 20:04:50 +03:00
Nikolai Kochetov
a790d391c0 Merge branch 'master' into rewrite-pushing-to-views 2021-09-20 19:43:15 +03:00
tavplubix
922cf7ee20
Merge pull request #28373 from ClickHouse/tables_topsort
Resolve table dependencies on metadata loading
2021-09-20 14:46:47 +03:00
alesapin
a249dcc5f5
Merge pull request #28301 from kssenii/materialized-postgresql
MaterializedPostgreSQL: allow dynamically adding/deleting tables, altering settings
2021-09-20 14:16:29 +03:00
alexey-milovidov
5f5b96aa57
Merge pull request #28982 from vdimir/issue-28660-pmj-fuzz
Add additional checkTypesOfKeys to JoiningTransform::transformHeader
2021-09-20 12:30:00 +03:00
Maksim Kita
c2088678ed
Merge pull request #28803 from kitaisreal/executable-user-defined-functions
Executable user defined functions
2021-09-20 12:11:15 +03:00
vdimir
091ce151bf
Avoid cycles in optimizeFuseQuantileFunctions 2021-09-20 11:39:29 +03:00
kssenii
8d19ed5ee7 Fix remaining tests 2021-09-20 05:39:13 +00:00
Alexey Milovidov
ab44e0addb Change Docker org name 2021-09-20 01:52:21 +03:00
Alexey Milovidov
e513a5db32 Change <yandex> to <clickhouse> in configs 2021-09-20 01:38:53 +03:00
kssenii
db45363c19 Fix tests 2021-09-19 18:42:45 +00:00
Alexey Milovidov
7d24e110e4 Make something with more sense 2021-09-19 20:23:06 +03:00
Alexey Milovidov
b444d224b0 Merge branch 'master' into exp-smooth 2021-09-19 17:58:57 +03:00
Anton Popov
db50a1027e
Merge pull request #29132 from Avogar/fix-avro
Fix segfault in Avro with LowCardinality(Nullable)
2021-09-19 16:13:11 +03:00
Alexander Tokmakov
6bc6ef8f2e fix test 2021-09-19 01:12:11 +03:00
alexey-milovidov
20d8523a2e
Merge pull request #28888 from azat/mysql-in-fix
Fix queries to external databases (i.e. MySQL) with multiple columns in IN ( i.e. `(k,v) IN ((1, 2))` )
2021-09-18 15:53:40 +03:00
alexey-milovidov
2a9c6fb9fc
Merge pull request #29153 from azat/test-2010_lc_native-fix
Increase timeout in 2010_lc_native
2021-09-18 15:43:46 +03:00
alexey-milovidov
3eed1f06ea
Merge pull request #28952 from fuzzERot/h3-functions
Implementation of h3ToGeoBoundary
2021-09-18 14:27:11 +03:00
Azat Khuzhin
7f5f0e364d Increase timeout in 2010_lc_native
10 seconds it not enough [1]:

    2010_lc_native:                                                         [ FAIL ] 15.53 sec. - having stderror:
    Traceback (most recent call last):
      File "/usr/share/clickhouse-test/queries/0_stateless/2010_lc_native.python", line 302, in <module>
        main()
      File "/usr/share/clickhouse-test/queries/0_stateless/2010_lc_native.python", line 298, in main
        insertLowCardinalityRowWithIndexOverflow()
      File "/usr/share/clickhouse-test/queries/0_stateless/2010_lc_native.python", line 259, in insertLowCardinalityRowWithIndexOverflow
        readException(s)
      File "/usr/share/clickhouse-test/queries/0_stateless/2010_lc_native.python", line 185, in readException
        assert(readVarUInt(s) == 2)
      File "/usr/share/clickhouse-test/queries/0_stateless/2010_lc_native.python", line 65, in readVarUInt
        byte = readStrict(s)[0]
      File "/usr/share/clickhouse-test/queries/0_stateless/2010_lc_native.python", line 34, in readStrict
        cur = s.recv(size)
    socket.timeout: timed out

  [1]: https://clickhouse-test-reports.s3.yandex.net/29060/7f1160c466a968c680d1bc73e0ad5e9419d0b6d0/functional_stateless_tests_(debug).html#fail1

Server log:

    2021.09.17 21:02:53.734388 [ 682 ] {123456} <Trace> ContextAccess (default): Access granted: INSERT(x) ON test_0tmdh4.tab
    2021.09.17 21:03:04.835044 [ 682 ] {123456} <Error> executeQuery: Code: 117. DB::Exception: Index for LowCardinality is out of range. Dictionary size is 1, but found index with value 72057594037927936. (INCORRECT_DATA) (version 21.11.1.8109) (from [::ffff:127.0.0.1]:59512) (in query: insert into test_0tmdh4.tab format TSV settings input_format_defaults_for_omitted_fields=0), Stack trace (when copying this message, always include the lines below):

And according to trace_log the problem is slow unwind:

    2021-09-17 21:02:55.103893 libunwind::LocalAddressSpace::get32
    2021-09-17 21:02:56.151960 libunwind::LocalAddressSpace::get8
    2021-09-17 21:03:03.168447 libunwind::LocalAddressSpace::getULEB128
2021-09-18 10:53:02 +03:00
feng lv
4fbc7c3f31 remove unused code 2021-09-18 03:01:25 +00:00
Amos Bird
6b3cd34cff
Disable projections when ARRAY JOIN is used. 2021-09-18 08:15:59 +08:00
Kruglov Pavel
9fb73af891
Mark test as no-parallel 2021-09-17 23:54:09 +03:00
Kruglov Pavel
5ab8d5beda
Delete grep 2021-09-17 23:52:28 +03:00
Alexander Tokmakov
3bca886174 remove some trash 2021-09-17 22:29:10 +03:00
Kruglov Pavel
e9f0137340
Update test 2021-09-17 20:14:37 +03:00
Maksim Kita
784a4a33e0 Fixed tests 2021-09-17 18:43:00 +03:00
Maksim Kita
93ecbf3ae4 Added tests 2021-09-17 18:42:59 +03:00
Pavel Kruglov
aba86b010b Update docs, tests and add some fixes 2021-09-17 17:32:23 +03:00
Pavel Kruglov
fe79db79af Change test 2021-09-17 16:14:33 +03:00
Pavel Kruglov
48a3a2f75c Fix segfault in Avro with LowCardinality(Nullable) 2021-09-17 16:11:44 +03:00
Maksim Kita
14e4d49601
Merge pull request #29063 from ClickHouse/read-integer-overflow-bug-fix
Merging #27963
2021-09-17 16:06:58 +03:00
Nikolai Kochetov
a8c3b02598 Merge branch 'master' into rewrite-pushing-to-views 2021-09-17 15:38:11 +03:00
Vladimir C
333fd323f5
Merge pull request #29062 from Avogar/orc-fixes 2021-09-17 14:48:19 +03:00
anneji
f97f5c5c75 modify test cases 2 2021-09-17 19:28:27 +08:00
anneji
0e224ab449 modify test cases 2021-09-17 19:26:11 +08:00
anneji
41dd55c36a add test cases 2021-09-17 17:30:17 +08:00
PHO
3c4b1ea9c5 New setting: output_format_csv_null_representation
This is the same as output_format_tsv_null_representation but is for CSV output.
2021-09-17 17:58:23 +09:00
Nikita Mikhaylov
c52b8ec083
Introduced MergeTask and MutateTask (#25165)
Introduced MergeTask and MutateTask
2021-09-17 00:19:58 +03:00
Anton Popov
99175f7acc minor enhancements in async inserts 2021-09-16 20:55:34 +03:00
kssenii
c88dc460d4 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into interactive-mode-for-clickhouse-local 2021-09-16 16:13:04 +00:00
Anton Popov
77a995381b
Merge pull request #28975 from ClickHouse/check-what-if-do-not-add-const-agg-keys-with-having
Don not add const group by key for query with only having.
2021-09-16 18:33:53 +03:00
Pavel Kruglov
96dba14213 Improve MsgPack input/output format 2021-09-16 17:05:07 +03:00
vdimir
661a54827b
Do not throw LOGICAL_ERROR from fuse quantile for illegal params 2021-09-16 16:06:02 +03:00
Alexey Boykov
6386560a9b Small update 2021-09-16 15:56:33 +03:00
Alexey Boykov
1215c25bd7
Merge branch 'master' into numeric_tuple_functions 2021-09-16 15:46:18 +03:00
Alexey Boykov
53d7649c33 Constant p 2021-09-16 15:43:10 +03:00
mergify[bot]
d4ac1fdba0
Merge branch 'master' into h3-functions 2021-09-15 21:24:31 +00:00
Maksim Kita
7a72a765c2 Added tests 2021-09-16 00:01:01 +03:00
mergify[bot]
a8e9450d91
Merge branch 'master' into exp-smooth 2021-09-15 20:55:32 +00:00
Pavel Kruglov
2e9858172e Allow to input and output LowCardinality columns in ORC format 2021-09-15 22:04:36 +03:00
Anton Popov
f6191b98e7 Merge remote-tracking branch 'upstream/master' into HEAD 2021-09-15 17:47:22 +03:00
Anton Popov
8970dcdaf5 fix throwing exception for multiple clients in async inserts 2021-09-15 17:19:28 +03:00
feng lv
dc318000e4 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into filelog-engine 2021-09-15 14:12:49 +00:00
Nikolay Degterinsky
3139968b99 Try fix test 2021-09-15 17:11:42 +03:00
Kruglov Pavel
8d1bf1b675
Merge pull request #29008 from vdimir/issue-26980-join-id-alias
Do not replaceAliasColumnsInQuery for JOIN OR/USING sections
2021-09-15 16:27:46 +03:00
Nikita Mikhaylov
2684d06b51
Merge pull request #27135 from FArthur-cmd/compressed_output_formats_3473
compress INTO OUTFILE with parameter compress
2021-09-15 16:25:13 +03:00
Nikolay Degterinsky
24e515df05 Merge branch 'master' into query_parameters 2021-09-15 16:15:50 +03:00
Kruglov Pavel
8a67c3cf44
Merge pull request #28636 from amosbird/nullable-index-fix
Fix nullable/lowcardinality primary key with constant conversion
2021-09-15 15:56:19 +03:00
vdimir
cd7fb8132d
Split GatherFunctionQuantileVisitor to h/cpp, fix fuzzed bugs 2021-09-15 15:15:42 +03:00
kssenii
710c8d12dd Merge branch 'master' of github.com:ClickHouse/ClickHouse into materialized-postgresql 2021-09-15 12:28:09 +03:00
Maksim Kita
69e59f34da
Merge pull request #29014 from vdimir/issue-29007-dict-join-strictness
Check left join strictness in tryInitDictJoin
2021-09-15 11:11:30 +03:00
Anton Popov
dafc6d32ef add test to access rights 2021-09-15 01:42:28 +03:00
Anton Popov
fc17936c12 Merge remote-tracking branch 'upstream/master' into HEAD 2021-09-14 23:02:30 +03:00
mergify[bot]
fa903ac255
Merge branch 'master' into describe-with-subcolumns 2021-09-14 14:43:29 +00:00
Nikolai Kochetov
0e267c50b4 Merge branch 'master' into rewrite-pushing-to-views 2021-09-14 16:13:54 +03:00
Nikolai Kochetov
fc1456164a Add test from #28880 2021-09-14 15:50:39 +03:00
vdimir
a3304a87a4
Rename optimize_syntax_fuse_aggregate -> optimize_syntax_fuse_functions 2021-09-14 15:27:12 +03:00
vdimir
a1463d5719
Merge remote-tracking branch 'origin/master' into fuse_quantile 2021-09-14 15:23:06 +03:00
vdimir
5a1aeeb044
Use optimize_syntax_fuse_aggregate instead of optimize_fuse_sum_count_avg and optimize_fuse_quantile 2021-09-14 15:21:16 +03:00
vdimir
a3db56f056
Revert "fuse multi setting options into one when Optimize"
This reverts commit bbd7799375.
2021-09-14 15:12:21 +03:00
vdimir
32e8c11cab
Check left join strictness in tryInitDictJoin 2021-09-14 15:04:45 +03:00
Anton Popov
4403847744
Merge pull request #28325 from nicelulu/issues_27763
Bit shift operations for FixedString and String data types.
2021-09-14 14:45:29 +03:00
vdimir
3d2d994c5d
Skip JOIN OR/USING sections in replaceAliasColumnsInQuery 2021-09-14 14:13:19 +03:00
Nikolai Kochetov
6847610ed3
Merge pull request #28997 from ClickHouse/fix-num-threads-in-global-in-subquery
Fix num threads in global in subquery
2021-09-14 13:53:54 +03:00
hexiaoting
bbd7799375 fuse multi setting options into one when Optimize 2021-09-14 18:51:13 +08:00
Nikolai Kochetov
1b89719462
Update 2015_global_in_threads.sh 2021-09-14 11:53:53 +03:00
Alexander Tokmakov
f03484e0dc fix test 2021-09-14 11:46:40 +03:00
Nikolay Degterinsky
4204e20f06
Merge pull request #29001 from azat/fix-01150_ddl_guard_rwr
Fix 01150_ddl_guard_rwr test
2021-09-14 11:37:23 +03:00
vdimir
1fdbb9509f
Add additional checkTypesOfKeys to JoiningTransform::transformHeader 2021-09-14 11:03:22 +03:00
Vladimir C
6e526aff89
Merge pull request #28969 from vdimir/01115-explicit-db
Remove explicit DB in 01115_join_with_dictionary
2021-09-14 10:26:51 +03:00
feng lv
c58e232385 fix conflict 2021-09-14 06:41:57 +00:00
feng lv
19ed9c6dbc fix 2021-09-14 04:50:18 +00:00
Azat Khuzhin
1792b23a2c Fix 01150_ddl_guard_rwr test
CI report [1]:

    2021-09-13 09:55:27 Code: 219. DB::Exception: Received from localhost:9000. DB::Exception: New table appeared in database being dropped or detached. Try again.. (DATABASE_NOT_EMPTY)
    2021-09-13 09:55:27 Code: 82. DB::Exception: Received from localhost:9000. DB::Exception: Database test_01150 already exists.. (DATABASE_ALREADY_EXISTS)

  [1]: https://clickhouse-test-reports.s3.yandex.net/0/abe314feecd1647d7c2b952a25da7abf5c19f352/functional_stateless_tests_(release,_databaseordinary)/test_run.txt.out.log
2021-09-14 00:30:40 +03:00
alesapin
abe314feec
Merge pull request #28962 from azat/create-settings
Apply settings from CREATE AS SELECT queries
2021-09-13 22:14:21 +03:00
Nikolai Kochetov
e8bc0287ff Add test. 2021-09-13 20:53:31 +03:00
Anton Popov
7ec5c73c9b
Merge branch 'master' into issues_27763 2021-09-13 20:33:29 +03:00
feng lv
ded27ec02f update
update
2021-09-13 16:20:05 +00:00
feng lv
cfa92a0c1e fix
fix
2021-09-13 15:09:02 +00:00
Alexander Tokmakov
8ac19caca9 Merge branch 'master' into tables_topsort 2021-09-13 16:58:39 +03:00
feng lv
218ac23a87 update test
fix test
2021-09-13 11:41:23 +00:00
vdimir
9ebef6e3cf
Remove explicit DB in 01115_join_with_dictionary 2021-09-13 13:06:38 +03:00
Nikolay Degterinsky
84aea776c2 Merge branch 'master' into query_parameters 2021-09-13 12:54:48 +03:00
mergify[bot]
d731bf6c4d
Merge branch 'master' into compressed_output_formats_3473 2021-09-13 09:14:35 +00:00
Nikita Mikhaylov
4b3c0a95d1
Merge pull request #28046 from syominsergey/fix-build-clang-13-2
[WIP] Improve support for build with clang-13
2021-09-13 12:11:38 +03:00
Maksim Kita
6161365b4e
Merge pull request #28540 from azat/fix-zookeeper_mutations_and_insert_quorum_long
Fix insert_quorum_timeout in zookeeper_mutations_and_insert_quorum_long
2021-09-13 11:27:11 +03:00
Filatenkov Artur
c23fe5baf6
Improve codec for encr 19896 (#27476)
* change syntax of encrypted command

* commit all encrypted changes

* correct encryption

* correct config for test

* add tests and correct code style and typos

* correct test

* fix unbundled build

* add log warning messages

* improve code according to review comments

* correct nonce

* correct errors found by fuzzing

* improve codec AES_128_GCM_SIV. Add AES_256_GCM_SIV. Add sections for last in tests. Improve documentation

* Update CompressionCodecEncrypted.h

* Update 01683_codec_encrypted.sql

* correct compression factory after changes in master

* correct behavior with wrong key in data

* correct fuzzer

* add connection for fuzzer with fix for compression_encrypted

* refactor code

* add load from config with throwing errors on server start

* fix typos and check style

* Update Server.cpp

* correct loading and reading

* refactor code. fix uninitialized value

* refactor code

* move defines from server to cpp file

* correct build

* remove repeated code

* correct namespace

* fix code style
2021-09-13 11:25:36 +03:00
Maksim Kita
e9d7dfeeb1
Merge pull request #28863 from kitaisreal/column-default-dict-get-identifier-fix
Column default dictGet identifier fix
2021-09-13 10:56:39 +03:00
Azat Khuzhin
dad02452c8 Apply settings from CREATE AS SELECT queries 2021-09-13 10:10:00 +03:00
alexey-milovidov
ad997cf51e
Merge branch 'master' into exp-smooth 2021-09-13 07:29:49 +03:00
alexey-milovidov
b467df98d3
Update 02006_h3_to_geo_boundary.sql 2021-09-13 07:25:46 +03:00
feng lv
bd1990a67c fix test and restrict path 2021-09-13 03:44:12 +00:00
Vitaly Baranov
512786346c
Merge pull request #28909 from vitlibar/convert-skip-list-into-first-line-comments
Convert skip_list .json into first line comments
2021-09-13 03:37:39 +03:00
kssenii
6fba81191f Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into interactive-mode-for-clickhouse-local 2021-09-12 21:48:27 +00:00
fuzzERot
dba428c443 Implementation of h3ToGeoBoundary 2021-09-12 23:47:51 +03:00
Nikolay Degterinsky
b02c807346
Merge pull request #27481 from nicelulu/add_sparkbar
Add sparkbar aggregate function.
2021-09-12 21:29:24 +03:00
Sergei Semin
12e24a23d3
Merge branch 'master' into fix-build-clang-13-2 2021-09-12 19:30:55 +03:00
Vitaly Baranov
39d73c01b2 Add tags to tests. 2021-09-12 17:15:28 +03:00
Kseniia Sumarokova
d4823d41b0
Merge pull request #28890 from azat/client-improvements-v2
Add query to the exception message in case of error during processing INSERT block on client
2021-09-12 16:07:57 +03:00
alexey-milovidov
aa5c42b7db
Merge pull request #28773 from azat/nth_value-ubsan-fix
Fix signed integer overflow for nth_value() window function
2021-09-12 15:57:19 +03:00
alexey-milovidov
cdcfdbec7e
Merge pull request #28873 from CurtizJ/fix-subcolumns-compact-parts
Fix reading of subcolumns from compact parts
2021-09-12 15:54:07 +03:00
alexey-milovidov
f066edc43c
Merge pull request #28910 from ClickHouse/fix-trash-optimization
Fix bad optimization of ORDER BY in subquery if it contains WITH FILL
2021-09-12 15:27:53 +03:00
alexey-milovidov
ea13a8b562
Merge pull request #28659 from myrrc/improvement/tostring_to_magic_enum
Improving CH type system with concepts
2021-09-12 15:26:29 +03:00
Alexey Milovidov
9ea1d443ba Add exponentialMovingSum aggregate function 2021-09-12 12:26:13 +03:00
alexey-milovidov
1616a0e230
Merge pull request #28887 from Avogar/fix-short-circuit
Fix bug with LowCardinality in short-curcuit function evaluation
2021-09-12 09:06:02 +03:00
Alexey Milovidov
797e1f4fd4 Add more tests 2021-09-12 08:37:51 +03:00
Alexey Milovidov
0745631bf7 Add aggregate function for exp smoothing 2021-09-12 08:26:07 +03:00
Alexey Milovidov
7899c6a0f1 One more 2021-09-12 03:00:09 +03:00
Alexey Milovidov
98a25f3ece Add a test 2021-09-12 02:56:47 +03:00
Alexey Milovidov
8935a70f60 Fix another misoptimization 2021-09-12 01:41:37 +03:00
Alexey Milovidov
d85588210d Fix bad optimization of ORDER BY in subquery if it contains WITH FILL 2021-09-12 01:24:20 +03:00
Anton Popov
02a7edf902 allow to include subccolumns in describe query 2021-09-12 00:07:33 +03:00
Azat Khuzhin
c7e5cd7cda Fix arrayCumSumNonNegative() for consts 2021-09-11 22:39:30 +03:00
Azat Khuzhin
6403cbee46 Fix arrayDifference() for consts 2021-09-11 22:39:30 +03:00
Azat Khuzhin
3c75844a79 Fix SIGSEGV for arrayCompact() with consts
arrayCompact() implements useDefaultImplementationForConstants() but it
is a no-op for FunctionArrayMapped, fix this.

CI report [1]:

  [1]: https://clickhouse-test-reports.s3.yandex.net/28890/baac2e561cfb05bc174f0bd25571e607d19c7463/fuzzer_asan/report.html#fail1
2021-09-11 22:39:20 +03:00
Azat Khuzhin
2f34ab1717 tests: update 00900_long_parquet_load.reference 2021-09-11 21:59:42 +03:00
kssenii
33ff6ec060 Fix tests 2021-09-11 17:17:48 +00:00
Sergei Semin
d2c678928c remove cases with unspecified behaviour (out of UInt64 range) 2021-09-11 18:14:00 +03:00
kssenii
6f04e87bc3 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into interactive-mode-for-clickhouse-local 2021-09-11 14:54:57 +00:00
alexey-milovidov
648d561242
Merge pull request #28828 from azat/nested-combinators
Relax nested function for If-combinator check (but forbid nested identical combinators)
2021-09-11 15:53:19 +03:00
Azat Khuzhin
976874d57b tests/01016_input_null_as_default: remove one more tuple nesting
CI report [1]:

    01016_input_null_as_default:                                            [ FAIL ] - having stderror:
    Code: 53. DB::Exception: Bad size of tuple. Expected size: 1, actual size: 2.: While executing ValuesBlockInputFormat: data for INSERT was parsed from stdin. (TYPE_MISMATCH)

  [1]: https://clickhouse-test-reports.s3.yandex.net/28888/5ad9cb9b797abe498ae558f9c233e16cd89e41b4/fast_test.html#fail1
2021-09-11 15:38:30 +03:00
Azat Khuzhin
b51c180922 tests/00132_sets: remove one more tuple nesting
CI report [1]:

    2021-09-11 14:25:31 [5656ccb14ed9] 2021.09.11 14:25:31.498685 [ 18561 ] {6096a73f-2066-4c78-9f99-73f013c96deb} <Error> executeQuery: Code: 43. DB::Exception: Invalid types for IN function: Tuple(UInt8, Tuple(UInt8, UInt8)) and Tuple(Tuple(Tuple(UInt8, Tuple(UInt8, UInt8)), Tuple(UInt8, Tuple(UInt8, UInt8)))).: While processing (1 AS number, (2, 3) AS tuple) IN tuple(((1, (2, 3)), (4, (5, 6)))). (ILLEGAL_TYPE_OF_ARGUMENT) (version 21.11.1.1) (from [::1]:32780) (comment: 00132_sets.sql) (in query: SELECT number, tuple FROM (SELECT 1 AS number, (2, 3) AS tuple) WHERE (number, tuple) IN (((1, (2, 3)), (4, (5, 6))));), Stack trace (when copying this message, always include the lines below):

  [1]: https://clickhouse-test-reports.s3.yandex.net/28888/5ad9cb9b797abe498ae558f9c233e16cd89e41b4/fast_test.html#fail1
2021-09-11 15:29:43 +03:00
Pavel Kruglov
9c756fc4b2 Fix bug with LowCardinality in short-curcuit function evaluation 2021-09-11 12:56:25 +03:00
Artur
c77a65f9d5 avoid error with order 2021-09-11 07:28:54 +00:00
Azat Khuzhin
c6b9816d45 tests: mark 00763_lock_buffer as long
https://clickhouse-test-reports.s3.yandex.net/28827/58266e4ed6db77109e6237ecd2612d34c0b19516/functional_stateless_tests_flaky_check_(address).html#fail1
2021-09-11 09:15:38 +03:00
Azat Khuzhin
f7540dad56 tests: update 01305_replica_create_drop_zookeeper after client query printing 2021-09-11 09:13:23 +03:00
Mike Kot
c4385a2c40 Simplifying exception messages 2021-09-11 00:40:18 +02:00
Azat Khuzhin
58266e4ed6 tests/queries/0_stateless/01175_distributed_ddl_output_mode_long: use unique tmp file 2021-09-10 23:23:24 +03:00
Azat Khuzhin
4336038711 tests: update more references after client started printing query 2021-09-10 23:19:16 +03:00
Azat Khuzhin
1e7714d56d Forbid nested identical (only) combinators
Nested identical combinators (i.e. uniqCombinedIfIf) is not
supported (since they even don't work -- silently).

But non-identical does supported and works, for example
uniqCombinedIfMergeIf, it is useful in case when the underlying
storage stores AggregateFunction(uniqCombinedIf) and in SELECT you
need to filter aggregation result based on another column for
example.
2021-09-10 21:03:24 +03:00
Azat Khuzhin
60df1e8800 Relax nested function for If-combinator check
Second If combinator can be useful to add condition based on another
column, when Merge combinator is applied for example (i.e.
uniqCombinedIfMergeIf(state_of_merge_that_is_stored_in_table, event_date = today())).
2021-09-10 21:03:24 +03:00
Azat Khuzhin
c4a24c7696 tests: update reference after client started printing query 2021-09-10 21:02:55 +03:00
Azat Khuzhin
b383115389 Allow values up to INT64_MAX for nth_value/lagInFrame/leadInFrame 2021-09-10 21:02:06 +03:00
Azat Khuzhin
62a29420bd Fix signed integer overflow for nth_value() window function
CI report [1]:

    ../src/Processors/Transforms/WindowTransform.cpp:1699:54: runtime error: signed integer overflow: -9223372036854775808 - 1 cannot be represented in type 'long' Received signal -3 Received signal Unknown signal (-3)

In query:

    SELECT
        number,
        nth_value(number, 2147483648) OVER w,
        anyOrNull(number) OVER (ORDER BY -2147483648 - intDiv(number, 1024) DESC NULLS FIRST, number DESC ROWS BETWEEN 65535 FOLLOWING AND UNBOUNDED FOLLOWING),
        nth_value(number, 65537) OVER w AS firstValue,
        nth_value(number, -9223372036854775808) OVER w AS secondValue,
        nth_value(number, 1048576) OVER w AS thirdValue
    FROM numbers(1)
    WINDOW w AS (ORDER BY number DESC)
    ORDER BY number DESC

  [1]: https://clickhouse-test-reports.s3.yandex.net/28532/7623af5513e12aa8dfa1bee963caffe00185c31a/fuzzer_ubsan/report.html#fail1
2021-09-10 21:02:04 +03:00
Anton Popov
a63887413c fix reading of subcolumns from compact parts 2021-09-10 20:19:18 +03:00
Nikolay Degterinsky
35db28321e Fix tests 2021-09-10 19:35:56 +03:00
Nikolai Kochetov
3a9d88fbc9 Fix more tests. 2021-09-10 17:52:24 +03:00
Maksim Kita
a87ffdff92 Column default dictGet identifier fix 2021-09-10 17:41:09 +03:00
Anton Popov
0bb74f8eaf
Merge pull request #28762 from CurtizJ/fix-nested-1
Fix usage of nested columns with non-array columns with the same prefix [2]
2021-09-10 17:34:43 +03:00
Artur
a7c43c3e2d add compression key-word and some tests 2021-09-10 13:59:22 +00:00
Anton Popov
5cff615eca Merge remote-tracking branch 'upstream/master' into HEAD 2021-09-10 13:40:48 +03:00
mergify[bot]
95be9c3571
Merge branch 'master' into add_sparkbar 2021-09-10 10:19:27 +00:00
Alexander Tokmakov
3f8fb1e562 Merge branch 'master' into tables_topsort 2021-09-10 13:16:41 +03:00
Maksim Kita
bdbf0c1967
Merge pull request #28821 from azat/compile-short-circuit-eval
Fix expressions compilation with short circuit evaluation
2021-09-10 00:49:00 +03:00
Azat Khuzhin
63e14fc389 Fix expressions compilation with short circuit evaluation
Before this patch, you may get the following error:

    Column Function is not a contiguous block of memory

Since under short circuit evaluation you may get Function not the
result.
2021-09-09 22:43:11 +03:00
Anton Popov
4eae64b174 add stress test for async inserts 2021-09-09 20:17:19 +03:00
Alexey Boykov
d63a1fbe40 Add aliases 2021-09-09 18:45:05 +03:00
Alexey Boykov
17bbe120f6 Tests with non constant columns 2021-09-09 18:19:31 +03:00
Alexey Boykov
7eb725a743 Corner cases (check description)
+ for Strings, * for String and Number are not added as it can be implemented soon. LpNorm cannot get Decimal because of the pow function.
2021-09-09 16:32:17 +03:00
Alexey Boykov
7da26f8f3b NULL support (check description)
Interesting bug or feature: (1, 2) * NULL is NULL, not tuple of NULLs.
2021-09-09 16:07:51 +03:00
kssenii
1838a8672d Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into interactive-mode-for-clickhouse-local 2021-09-09 12:43:45 +00:00
kssenii
904cf74159 Merge branch 'master' of github.com:ClickHouse/ClickHouse into materialized-postgresql 2021-09-09 15:26:20 +03:00
Nikolai Kochetov
13eb93a9c0
Merge pull request #28700 from amosbird/projection-fix16
Fix crash on exception with projection aggregate
2021-09-09 15:24:05 +03:00
Anton Popov
8e5b3b2f6c Merge remote-tracking branch 'upstream/master' into HEAD 2021-09-09 15:12:34 +03:00
Nikolai Kochetov
abfb1d20ea
Merge pull request #25734 from vdimir/join-arrayjoin-type-cast
Move join type inference to ExpressionAnalyzer from syntax stage + small refactor
2021-09-09 14:38:43 +03:00
tavplubix
341a6c51d6
Merging #24866 (#28691)
* Add StorageSystemISTables.cpp/.h

* Another attempt

* Columns and Views

* Add information schema db and fix information schema 'tables' table

* fix build

* remove copy-paste, add views to system tables

* add test

* fix

* fix_tests

Co-authored-by: Damir Petrov <petrovdamir2235@gmail.com>
Co-authored-by: Damir Petrov <0442a403@verstehen.sas.yp-c.yandex.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-09-09 12:37:51 +03:00
Amos Bird
91293c7449
Fix crash on exception with projection aggregate 2021-09-09 10:43:56 +08:00
kssenii
797f858bc6 Merge branch 'master' of github.com:ClickHouse/ClickHouse into materialized-postgresql 2021-09-08 22:52:48 +03:00
Anton Popov
9816014f6c fix nested and scalar columns with dot, which is missed in part 2021-09-08 21:42:34 +03:00
Anton Popov
f864c4252a support adding defaults in async inserts 2021-09-08 17:08:57 +03:00
mergify[bot]
64fb384656
Merge branch 'master' into global-merge-executor 2021-09-08 13:15:38 +00:00
mergify[bot]
9f0c50335f
Merge branch 'master' into tables_topsort 2021-09-08 10:55:11 +00:00
Anton Popov
5d33baab5f
Merge pull request #28658 from CurtizJ/fix-or-to-in
Fix optimization of disjunctions chain in distributed queries
2021-09-08 13:26:45 +03:00
alesapin
3b9dae8718
Merge pull request #28616 from ClickHouse/qoega-try-llvm-12
Merging #20495
2021-09-08 11:43:46 +03:00
Vladimir C
70fbc85768
Merge pull request #28686 from ljcui/distributed_coredump
Fix coredump in creating distributed table
2021-09-08 10:52:56 +03:00
Nikita Mikhaylov
6062dd0021 Better 2021-09-08 00:21:21 +00:00
Nikita Mikhaylov
e398af08dc Maybe fix test 2021-09-07 19:53:51 +00:00
Vitaly Baranov
59148fa453
Merge pull request #22415 from Enmk/governance/session_log
Governance/session log
2021-09-07 22:09:32 +03:00
alesapin
d9ca1e29c3 Increase stack size for coroutines 2021-09-07 15:56:32 +03:00
ZhiYong Wang
978dd19fa2 Fix coredump in creating distributed table 2021-09-07 19:05:26 +08:00
Dmitry Novik
99dc685146
Merge pull request #28315 from amosbird/indexfix
Fix NOT-IN index optimization when not all key columns are used.
2021-09-07 11:58:30 +03:00
alesapin
81d3e33087 Add crashing test 2021-09-07 10:36:39 +03:00
Vitaly Baranov
70c6623036
Merge branch 'master' into governance/session_log 2021-09-07 10:12:54 +03:00
Vitaly Baranov
bcc31f1f3e Remove unnecessary changes. 2021-09-07 01:37:28 +03:00
Nikolay Degterinsky
7e20b303a0 Add test 2021-09-07 01:19:02 +03:00
kssenii
7bea8200d8 Revert "Merge pull request #28082 from zhongyuankai/add-system-of-table_views"
This reverts commit e5bcfba89e, reversing
changes made to d77f243651.
2021-09-06 19:20:33 +00:00
zhangxiao871
0b6ab61633 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into yandex-master 2021-09-07 01:22:02 +08:00
zhangxiao871
fe3e786cf2 add bitShiftLeft for FixedString and String integer. 2021-09-07 01:20:12 +08:00
Anton Popov
47f46e388d fix optimization of disjunctions chain 2021-09-06 16:54:26 +03:00
Nikolai Kochetov
2178ed21df
Merge pull request #28560 from amosbird/projection-fix15
Fix wrong header of minmax_count projection
2021-09-06 13:00:44 +03:00
Amos Bird
8fac97692a
Fix nullable primary key with constant conversion 2021-09-06 15:11:37 +08:00
Amos Bird
18a7adf0fa
Fix NOT-IN index optimization when not all keys are used. 2021-09-06 12:21:03 +08:00
zhangxiao871
e73719ab80 Fix FixedString type ConstConst. 2021-09-05 13:21:06 +08:00
kssenii
d0113743c9 Merge branch 'master' of github.com:ClickHouse/ClickHouse into materialized-postgresql 2021-09-05 01:07:31 +03:00
kssenii
1c20b223cb Merge branch 'master' of github.com:ClickHouse/ClickHouse into interactive-mode-for-clickhouse-local 2021-09-04 20:01:31 +03:00
zhangxiao871
6d5605e1ee Better support FixedString type and add test case. 2021-09-05 00:41:52 +08:00
Maksim Kita
f076cc69b4
Merge pull request #28530 from kitaisreal/dict-get-default-implementation-for-nulls
Function dictGet default implementation for nulls
2021-09-04 13:29:22 +03:00
Anton Popov
66173d2cc0 fix debug assert in table asynchronous_inserts 2021-09-04 04:11:37 +03:00
Anton Popov
275118b0e8 fix data race in InsertQuery 2021-09-04 03:57:05 +03:00
Maksim Kita
c329f04b22 Fixed tests 2021-09-03 23:08:55 +03:00
Anton Popov
59128412ea Merge remote-tracking branch 'upstream/master' into HEAD 2021-09-03 22:17:11 +03:00
Anton Popov
f91f8c1e8f add more tests with async inserts 2021-09-03 20:31:29 +03:00
Kruglov Pavel
f559c34113
Merge pull request #28302 from amosbird/binaryconstantwrap
Always monotonic for non-zero division
2021-09-03 20:02:54 +03:00
Kseniia Sumarokova
67ffb59b72
Merge pull request #28531 from CurtizJ/fix-nested
Fix usage of nested columns with non-array columns with the same prefix
2021-09-03 18:06:27 +03:00
alesapin
dd7493d871
Merge pull request #27038 from excitoon-favorites/altermaterializecolumn
`ALTER TABLE ... MATERIALIZE COLUMN`
2021-09-03 15:50:52 +03:00
Amos Bird
bb87d01579
Fix wrong header of minmax_count projection 2021-09-03 18:49:01 +08:00
kssenii
f17d1bc7a5 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into materialized-postgresql 2021-09-03 09:03:48 +00:00
Azat Khuzhin
4909d3f2e0 Fix endless loop for truncated bzip2
Stress test (thread) found an issue [1]:

    elapsed:              2094.356407533
    query:                SELECT count(), max(x) FROM file
    thread_ids:           [2927,11494,7502]
    current_database:     test_19

Stacktrace for 7502:

    0  __syscall () at ../base/glibc-compatibility/musl/x86_64/syscall.s:14
    1  0x000000001ba033b8 in clock_nanosleep (clk=1, flags=1, req=0x7fbb8adaed68, rem=0x0) at ../base/glibc-compatibility/musl/clock_nanosleep.c:21
    2  0x0000000018e25b84 in sleepForNanoseconds (nanoseconds=<optimized out>) at ../base/common/sleep.cpp:48
    3  0x0000000009a47143 in DB::injection (yield_probability=0, migrate_probability=0, sleep_probability=0.10000000000000001, sleep_time_us=100000) at ../src/Common/ThreadFuzzer.cpp:193
    4  DB::ThreadFuzzer::signalHandler () at ../src/Common/ThreadFuzzer.cpp:204
    5  0x00000000098e1447 in __tsan::CallUserSignalHandler(__tsan::ThreadState*, bool, bool, bool, int, __sanitizer::__sanitizer_siginfo*, void*) ()
    6  0x00000000098d7f99 in __tsan::ProcessPendingSignals(__tsan::ThreadState*) ()
    7  0x00000000098e57de in pread ()
    8  0x00000000099fab84 in DB::ReadBufferFromFileDescriptor::nextImpl (this=0x7b38010ddb00) at ../src/IO/ReadBufferFromFileDescriptor.cpp:62
    9  0x0000000009ab0cf3 in DB::ReadBuffer::next (this=0x7b38010ddb00) at ../src/IO/ReadBuffer.h:62
    10 DB::ReadBuffer::nextIfAtEnd (this=0x7b38010ddb00) at ../src/IO/ReadBuffer.h:78
    11 DB::Bzip2ReadBuffer::nextImpl (this=0x7b20032f4800) at ../src/IO/Bzip2ReadBuffer.cpp:59

It looks like bz2 is not capable to read/fail partially written archive:

    2021.09.03 00:52:36.744818 [ 3553 ] {90419c0a-c410-42ea-ba76-7672ff5ae5ec} <Debug> executeQuery: (from [::1]:54714) (comment: '/usr/share/clickhouse-test/queries/0_stateless/01059_storage_file_compression.sh') CREATE TABLE file (x UInt64) ENGINE = File(TSV, 'test_19/bz2.tsv.bz2')
    2021.09.03 00:52:41.255409 [ 2927 ] {9c7b4e21-cc37-438d-9c13-f9dc01efd30c} <Debug> executeQuery: (from [::1]:54750) (comment: '/usr/share/clickhouse-test/queries/0_stateless/01059_storage_file_compression.sh') TRUNCATE TABLE file
    2021.09.03 00:52:43.762791 [ 2927 ] {82857e3d-f7cc-453d-82a4-e8b8fb82ae0e} <Debug> executeQuery: (from [::1]:54758) (comment: '/usr/share/clickhouse-test/queries/0_stateless/01059_storage_file_compression.sh') INSERT INTO file SELECT * FROM numbers(1000000)
    2021.09.03 00:52:54.939333 [ 2927 ] {82857e3d-f7cc-453d-82a4-e8b8fb82ae0e} <Error> executeQuery: Code: 241. DB::Exception: Memory limit (total) exceeded: would use 63.07 GiB (attempt to allocate chunk of 4194364 bytes), maximum: 62.94 GiB. (MEMORY_LIMIT_EXCEEDED) (version 21.10.1.7982) (from [::1]:54758) (comment: '/usr/share/clickhouse-test/queries/0_stateless/01059_storage_file_compression.sh') (in query: INSERT INTO file SELECT * FROM numbers(1000000)), Stack trace (when copying this message, always include the lines below):
    2021.09.03 00:53:08.505015 [ 2927 ] {2bc7444e-c0d6-462e-9d6a-567f70b01697} <Debug> executeQuery: (from [::1]:54842) (comment: '/usr/share/clickhouse-test/queries/0_stateless/01059_storage_file_compression.sh') SELECT count(), max(x) FROM file

  [1]: https://clickhouse-test-reports.s3.yandex.net/28474/6d5f01a56bb1715c47de8444bfc85b39228f3081/stress_test_(thread).html#fail1
2021-09-03 10:49:17 +03:00
Azat Khuzhin
acf655de16 Fix insert_quorum_timeout in zookeeper_mutations_and_insert_quorum_long 2021-09-03 10:26:03 +03:00
alesapin
1894524438
Merge pull request #28528 from ClickHouse/fix_detach_attach_versioned_collapsing
Fix detach/attach for ReplicatedVersionedCollapsingMergeTree after alter
2021-09-03 10:13:52 +03:00
alesapin
d571c84a56 Better test for flaky check 2021-09-02 23:41:00 +03:00
Anton Popov
ee7f50396b fix nested and scalar columns with dot 2021-09-02 20:22:01 +03:00
alesapin
ba78a737dc Fix detach/attach for ReplicatedVersionedCollapsingMergeTree after alter 2021-09-02 17:47:00 +03:00
Nikolai Kochetov
af0da33147
Merge pull request #27827 from ClickHouse/more-checks-for-lv-and-native
Add more checks for LC in native protocol.
2021-09-02 17:27:42 +03:00
Alexander Tokmakov
1e2844f999 support function IN 2021-09-02 16:48:41 +03:00
Alexey Milovidov
03ae73a91a Drop arcadia_skip_list.txt 2021-09-02 16:19:36 +03:00
alesapin
b592400e54
Merge pull request #28404 from ClickHouse/remove_outdated_settings
Remove obsolete settings for replicated fetches.
2021-09-02 14:03:12 +03:00
Nikolai Kochetov
5f0b1bc4e3
Merge pull request #26286 from amosbird/projection-improve2
Virtual projection for min max indices.
2021-09-02 13:03:30 +03:00
Anton Popov
5e421ab272 Merge remote-tracking branch 'upstream/master' into HEAD 2021-09-02 02:42:50 +03:00
Anton Popov
7c42ce8370 improvements of async inserts 2021-09-02 02:18:09 +03:00
Nikolay Degterinsky
53b6d918eb
Merge pull request #25310 from bharatnc/ncb/import-export-lz4
LZ4 compression for import/export
2021-09-01 21:12:50 +03:00
mergify[bot]
5d299fbdee
Merge branch 'master' into remove_outdated_settings 2021-09-01 14:07:48 +00:00
vdimir
13bf141e1d
Fix storage_join type inference 2021-09-01 15:05:47 +03:00
vdimir
c4ffc2879f
Perform join type inference for USING at ExpressionAnalyzer instead of TreeRewriter 2021-09-01 15:05:47 +03:00
tavplubix
e55c0bc40a
Merging #27980 (#28413)
* fix: empty string convert to DecimalOrNumbeOrDateOrDateTime

* fix: ifnull convert to defaut value

* fix variable name

* fix cast args

* modify ifnull args

* use short circuit

Co-authored-by: liyang830 <liyang830@jd.com>
2021-09-01 12:12:23 +03:00