Commit Graph

12067 Commits

Author SHA1 Message Date
avogar
6b541aa98f Fix WriteBuffer finalize when cancel insert into function 2022-07-21 12:18:37 +00:00
Maksim Kita
baea3b01b1
Merge pull request #39385 from jawm/jawm/direct-dicthas
Remove broken optimisation in Direct dictionary dictHas implementation
2022-07-21 11:43:48 +02:00
Nikolai Kochetov
e15967e9db
Merge pull request #38475 from ClickHouse/additional-filters
Additional filters for a table (from setting)
2022-07-21 07:52:04 +02:00
Alexey Milovidov
f4f5a5e044
Merge pull request #39397 from azat/fix-extractAll
Fix UB (stack-use-after-scope) in extactAll()
2022-07-21 05:21:18 +03:00
Nikolai Kochetov
3b755ffb2a
Merge pull request #39391 from ClickHouse/fix-date-time-64-columns-dor-dict
Fix scale for DateTime64 dictionary attribute.
2022-07-20 23:14:33 +02:00
Nikolai Kochetov
91aa2385ca
Merge branch 'master' into additional-filters 2022-07-20 18:56:24 +02:00
Igor Nikonov
7616a24c40
Merge pull request #38980 from ClickHouse/explain_ast_rewrite_follow_up
EXPLAIN AST rewrite: rename to optimize
2022-07-20 18:42:14 +02:00
Kruglov Pavel
0efed4644d
Merge pull request #38957 from Avogar/compatibility-setting
Add compatibility setting and system.settings_changes system table
2022-07-20 17:46:06 +02:00
James Morrison
d60a02829f Remove broken optimisation in Direct dictionary dictHas implementation
I noticed this while working on another feature - if a set of keys being
passed to `hasKeys` contains duplicates, then only one of the result
slots for these keys will be populated.

My fix uses to a simpler implementation which is likely slower, but is
correct, which seems more important. No doubt faster approaches exist
which are also correct.
2022-07-20 14:45:32 +00:00
Dmitry Novik
a09422de7b
Merge pull request #38642 from ClickHouse/group-by-use-nulls
Add group_by_use_nulls setting
2022-07-20 14:42:42 +02:00
Igor Nikonov
5509850b23
Merge branch 'master' into explain_ast_rewrite_follow_up 2022-07-20 12:18:47 +02:00
Vladimir C
da26cf5609
Merge pull request #39326 from vdimir/setting_cross_to_inner_rewrite
Set default value cross_to_inner_join_rewrite = 2 for comma join
2022-07-20 11:13:47 +02:00
Azat Khuzhin
18eb8b6d48 Fix UB (stack-use-after-scope) in extactAll()
After #37544 OptimizedRegularExpressionImpl started to be moved, but
StringSearcher is not copyable since it holds pointers that goes out of
scope after move (before Regexps::get() returns std::shared_ptr<Regexp>
but it had been replaced with Regexps::createRegexp() that returns
Regexp object).

<details>

<summary>ASan report</summary>

    ==48348==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7fff577239a9 at pc 0x00001518209b bp 0x7fff57723820 sp 0x7fff57723818
    READ of size 1 at 0x7fff577239a9 thread T0
        0 0x1518209a in char8_t const* DB::StringSearcher<true, true>::search<char8_t>(char8_t const*, char8_t const*) const /bld/./src/Common/StringSearcher.h:730:41
        1 0x1518dd3f in char8_t const* DB::StringSearcher<true, true>::search<char8_t>(char8_t const*, unsigned long) const /bld/./src/Common/StringSearcher.h:751:16
        2 0x1518dd3f in OptimizedRegularExpressionImpl<false>::match(char const*, unsigned long, std::__1::vector<OptimizedRegularExpressionDetails::Match, std::__1::allocator<OptimizedRegularExpressionDetails::Match> >&, unsigned int) const /bld/./src/Common/OptimizedRegularExpression.cpp:463:54
        3 0x1811cb42 in DB::ExtractAllImpl::get(char const*&, char const*&) /bld/./src/Functions/FunctionsStringArray.h:588:18
        4 0x1811aa62 in DB::FunctionTokens<DB::ExtractAllImpl>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const /bld/./src/Functions/FunctionsStringArray.h:704:30
        5 0x14fe17b4 in DB::IFunction::executeImplDryRun(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const /bld/./src/Functions/IFunction.h:409:16

    Address 0x7fff577239a9 is located in stack of thread T0 at offset 201 in frame
        0 0x1518d98f in OptimizedRegularExpressionImpl<false>::match(char const*, unsigned long, std::__1::vector<OptimizedRegularExpressionDetails::Match, std::__1::allocator<OptimizedRegularExpressionDetails::Match> >&, unsigned int) const /bld/./src/Common/OptimizedRegularExpression.cpp:439

</details>

CI: https://s3.amazonaws.com/clickhouse-test-reports/39342/c6f7698f9ad6ae22199182ebf7c3b2dac77d69d8/fuzzer_astfuzzerasan,actions//report.html
Fixes: #37544 (cc @rschu1ze)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-20 10:18:44 +03:00
Nikolai Kochetov
5fbc5b25de Added test. 2022-07-19 16:50:32 +00:00
vdimir
b58f9adce9
Fix tests for cross_to_inner_join_rewrite 2022-07-19 18:33:55 +02:00
vdimir
10e4ef135d
Set default value cross_to_inner_join_rewrite = 2 for comma join 2022-07-19 18:33:54 +02:00
Dmitry Novik
50989bdb68
Merge branch 'master' into group-by-use-nulls 2022-07-19 14:58:01 +02:00
Igor Nikonov
37af968548 Rename option rewrite -> optimize 2022-07-19 12:40:50 +00:00
Igor Nikonov
a54033b749 EXPLAIN AST rewrite: additional query in test 2022-07-19 11:54:22 +00:00
Kruglov Pavel
12221cffc9
Merge pull request #39071 from jiahui-97/parse_timedelta
implementation of parseTimeDelta function
2022-07-19 12:39:56 +02:00
Alexander Tokmakov
115c8d9b5f
Merge pull request #39339 from ClickHouse/fix_flaky_01174_select_insert_isolation
Fix flaky 01174_select_insert_isolation
2022-07-19 13:29:27 +03:00
Nikolai Kochetov
d0db7135cb
Merge pull request #38946 from amosbird/nullable-partition-fix1
Fix incorrect partition pruning when there is a nullable partition
2022-07-19 12:14:36 +02:00
jiahui-97
e7af88b688 implementation of parseTimeDelta function
Co-authored-by: Kruglov Pavel <48961922+Avogar@users.noreply.github.com>
2022-07-19 09:33:02 +08:00
Alexander Tokmakov
bc9c359abe
Update 01174_select_insert_isolation.sh 2022-07-18 18:47:35 +03:00
Alexander Tokmakov
ae96911735 fix flaky 01174_select_insert_isolation 2022-07-18 17:31:36 +02:00
Dmitry Novik
855ad30a5d
Merge pull request #39305 from ClickHouse/window-case-test
Add test for window function inside CASE
2022-07-18 16:10:11 +02:00
Robert Schulze
74e55e42f6
Merge pull request #39167 from ClickHouse/multiStringAllPositions-non-const-needle
multiStringAllPositions() with non-const needle
2022-07-18 15:30:14 +02:00
avogar
80b5bc5236 Add system table settings_changes 2022-07-18 13:19:41 +00:00
Anton Popov
5605b60c97
Merge pull request #39039 from CurtizJ/randomize-more-settings
Add more settings for randomization
2022-07-18 15:05:41 +02:00
Kruglov Pavel
85f8b5990f
Merge pull request #39192 from Avogar/improve-is-nullable
Improve isNullable/isConstant/isNull/isNotNull performance for LowCardinality argument
2022-07-18 12:33:34 +02:00
Alexander Tokmakov
611da87217
Merge pull request #39263 from ClickHouse/fix_assertion_in_transactions
Fix assertion in transactions
2022-07-18 11:43:50 +03:00
Robert Schulze
10d0a5e95b
More split up of tests to reduce runtimes 2022-07-18 07:05:34 +00:00
Dmitry Novik
4e9adc5211 Add test 2022-07-17 23:12:37 +00:00
Alexey Milovidov
13a8f85ed0
Merge branch 'master' into nullable-partition-fix1 2022-07-18 00:34:58 +03:00
Robert Schulze
01b40d5a45
Split 00233_position_function_family to avoid test timeouts
+ remove the five most expensive queries
2022-07-17 18:11:37 +00:00
Vitaly Baranov
e0fb03d1b6
Merge pull request #38970 from vitlibar/select-from-system-db-requires-grant
SELECT from the system database requires grant now
2022-07-16 22:37:47 +02:00
Ilya Yatsishin
43ed3df474
Merge pull request #39225 from qoega/query-log-fix-result-bytes 2022-07-15 23:46:03 +02:00
Kruglov Pavel
559d507f5a
Merge branch 'master' into compatibility-setting 2022-07-15 21:11:05 +02:00
alesapin
3fe17518b9
Merge pull request #39187 from ClickHouse/roaring-memory-tracking-fix
Fix 01961_roaring_memory_tracking test
2022-07-15 17:56:11 +02:00
alesapin
5cf4bd50de
Merge pull request #39214 from azat/s3-fix-fetching-memory-part
Fix fetch of in-memory part with allow_remote_fs_zero_copy_replication
2022-07-15 17:52:05 +02:00
Alexander Tokmakov
e69ea920bf
Merge branch 'master' into fix_assertion_in_transactions 2022-07-15 18:18:34 +03:00
Vitaly Baranov
5565089f44
Merge pull request #38933 from ClickHouse/simdjson-avx512-test
Add a test for simdjson
2022-07-15 16:48:08 +02:00
Nikolai Kochetov
f6a82a6a53
Merge pull request #39157 from ClickHouse/bug-lost-column
prewhere action should preserve sorting columns
2022-07-15 16:37:40 +02:00
Vitaly Baranov
ef3a24d20f Fix tests. 2022-07-15 15:44:29 +02:00
Alexander Tokmakov
94b5f1f536 disable transactions with Ordinary database 2022-07-15 15:36:01 +02:00
Kruglov Pavel
0867e5fc4b
Merge branch 'master' into multiStringAllPositions-non-const-needle 2022-07-15 14:26:24 +02:00
Anton Popov
76eec62469
Merge branch 'master' into randomize-more-settings 2022-07-15 14:12:49 +02:00
Anton Popov
da97a22465
Merge pull request #39243 from CurtizJ/send-logs-level-colors
Do not color logs on client if they are redirected to file
2022-07-15 13:33:13 +02:00
Yatsishin Ilya
c133f27724 style again 2022-07-15 09:56:56 +00:00
Yatsishin Ilya
4d96ff9b97 style 2022-07-14 22:25:10 +00:00