Commit Graph

11728 Commits

Author SHA1 Message Date
Alexey Milovidov
bb292b6aeb Fix wrong REGEXP_REPLACE alias 2022-07-26 07:59:58 +02:00
Kruglov Pavel
0655ff3265
Merge branch 'master' into fix-avro 2022-07-25 13:41:21 +02:00
Alexey Milovidov
6fdcb009ff
Merge pull request #39533 from ClickHouse/now-in-block
Add function `nowInBlock`
2022-07-25 04:22:11 +03:00
Nikita Taranov
a4ba3649f3
Fix 02286_parallel_final (#39524) 2022-07-25 00:54:03 +02:00
Alexey Milovidov
dfbfc12a10 More tests 2022-07-24 20:07:14 +02:00
Alexey Milovidov
c604df7b53 Add smoke test for timezone 2022-07-24 20:05:31 +02:00
Alexey Milovidov
cff712970e Add function nowInBlock 2022-07-24 19:58:48 +02:00
Robert Schulze
c788e05c77
Merge pull request #39292 from zvonand/zvonand-b58-datatype
Simplify Base58 encoding/decoding
2022-07-24 18:09:40 +02:00
avogar
8283cc9e2c Fix possible heap-buffer-overflow in Avro 2022-07-22 17:59:43 +00:00
Kruglov Pavel
d23da91fe7
Add tag 2022-07-22 18:41:31 +02:00
avogar
c6d0ca2940 Fix data race in Avro format 2022-07-22 14:23:05 +00:00
Ilya Yatsishin
196fe5a269
Merge branch 'master' into exact-rows-before-limit 2022-07-22 12:34:30 +02:00
Alexander Tokmakov
4c35e5fe8c
Merge pull request #39462 from Avogar/create-tmp-tables-as
Allow CREATE TEMPORARY TABLE ... (list of columns) AS ...
2022-07-22 12:29:50 +03:00
Kruglov Pavel
f4f05ec786
Merge pull request #39447 from Avogar/better-parse-time-delta
Extend time units in parseTimeDelta function
2022-07-21 17:39:40 +02:00
Nikolai Kochetov
17de7b2876
Revert "Fix trivial count optimization with array join" 2022-07-21 17:14:34 +02:00
Maksim Kita
82fc7375dd
Merge pull request #39444 from amosbird/fix-trivial-count-opt-1
Fix trivial count optimization with array join
2022-07-21 16:35:49 +02:00
avogar
821f006a7a Allow CREATE TEMPORARY TABLE ... (list of columns) AS ... 2022-07-21 14:24:11 +00:00
Andrey Zvonov
e473606cd1
Merge branch 'master' into zvonand-b58-datatype 2022-07-21 15:55:05 +02:00
Alexander Tokmakov
9a55f84885
Revert "Remove broken optimisation in Direct dictionary dictHas implementation" 2022-07-21 16:24:18 +03:00
Nikolai Kochetov
80f2c6f2d4
Merge pull request #39456 from ClickHouse/respect-alias-for-additional-table-filter
Respect table alias for additional_table_filters.
2022-07-21 14:02:18 +02:00
Anton Popov
68aab132a5
Merge pull request #38989 from lokax/tuple_elem
feat(function): tupleElement with default value
2022-07-21 13:58:08 +02:00
Kruglov Pavel
64a189249f
Merge pull request #39423 from ClickHouse/Avogar-patch-1
Disable format_csv_allow_single_quotes by default
2022-07-21 13:36:45 +02:00
Nikolai Kochetov
e6969d5010 Respect table alias for additional_table_filters. 2022-07-21 11:23:09 +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
avogar
076d1c0bb1 Merge branch 'Avogar-patch-1' of github.com:ClickHouse/ClickHouse into Avogar-patch-1 2022-07-21 08:58:13 +00:00
avogar
49d980d16c Extend time units in parseTimeDelta function 2022-07-21 08:55:51 +00:00
Amos Bird
98ff54700a
Fix trivial count optimization with array join 2022-07-21 16:23:25 +08:00
avogar
394fcf33ef Fix test 2022-07-21 07:53:11 +00: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
443f7c1237 Merge branch 'master' into Avogar-patch-1 2022-07-21 05:28:26 +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
avogar
b0e7d348f1 Fix tests 2022-07-20 21:16:59 +00: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
lokax
140f5e6685 recursive check array offsets
Signed-off-by: lokax <m632656684@gmail.com>
2022-07-20 21:20:00 +08:00
lokax
f42e0e8fe1 fix 2022-07-20 21:20:00 +08:00
lokax
764037f508 test(function): tupleElement with default 2022-07-20 21:20:00 +08:00
lokax
6e23d2cb85 feat(function): tupleElement with default value 2022-07-20 21:20:00 +08: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