Commit Graph

17764 Commits

Author SHA1 Message Date
Dmitry Novik
3c1b6609ae Add comments and make tests more verbose 2022-05-25 21:23:35 +00:00
Dmitry Novik
b3ccf96c81 Merge remote-tracking branch 'origin/master' into grouping-function 2022-05-19 17:58:33 +00:00
Dmitry Novik
d4c66f4a48 Code cleanup & fix GROUPING() with TOTALS 2022-05-19 16:36:51 +00:00
Alexander Tokmakov
a53cfa9fca
Merge pull request #37355 from ClickHouse/revert-37266-fix-mutations-with-object
Revert "Fix mutations in tables with columns of type `Object`"
2022-05-19 16:27:22 +03:00
Mikhail f. Shiryaev
9acb42fcdb
Add time to wait for workflow canceled 2022-05-19 15:26:02 +02:00
Kseniia Sumarokova
d4ad138a04
Merge pull request #37103 from bigo-sg/hive_partition_key_read
optimization for reading hive file  when all columns to read are partition keys
2022-05-19 14:24:00 +02:00
Kseniia Sumarokova
8dcee2813d
Merge pull request #37219 from Vxider/wv-watch-limit
Add test for WATCH LIMIT query in WindowView
2022-05-19 13:52:38 +02:00
Kseniia Sumarokova
24d0899cb7
Merge pull request #36945 from Vxider/wv-populate
POPULATE support for WindowView
2022-05-19 13:47:52 +02:00
Kseniia Sumarokova
af2d9154e1
Merge pull request #37279 from bigo-sg/hive_local_cache_multi_disk
Support multi disks for caching hive files
2022-05-19 13:25:03 +02:00
Kseniia Sumarokova
791cc5ced1
Merge pull request #37290 from azat/query-kind-client
Add ability to pass QueryKind via clickhouse-client/local (useful for debugging)
2022-05-19 13:22:42 +02:00
Mikhail f. Shiryaev
a6cb3be28b
Merge pull request #37348 from ClickHouse/tags-and-release
Tags and release
2022-05-19 12:30:58 +02:00
Alexander Tokmakov
f787dc7097
Revert "Fix mutations in tables with columns of type Object" 2022-05-19 13:24:48 +03:00
Kruglov Pavel
707f12a893
Merge pull request #37320 from ClickHouse/Avogar-patch-5
Speed up test 00157_cache_dictionary
2022-05-19 12:21:38 +02:00
Mikhail f. Shiryaev
3d0e4c56e2
Fix prefetch release branch 2022-05-19 10:05:34 +02:00
Vitaly Baranov
16c8e93dd0
Merge pull request #36941 from nvartolomei/nv/show-grants-current-roles
Allow a user to inspect grants from granted roles
2022-05-19 09:20:52 +02:00
Azat Khuzhin
29a8a00656 Add ability to pass QueryKind via clickhouse-client/local (useful for debugging)
v2: fix LocalConnection::sendQuery() for Suggest (comes w/o client_info) [1]
    [1]: https://s3.amazonaws.com/clickhouse-test-reports/37290/7c85175963226ff78eec542efafcff4e650aa0f0/stateless_tests__ubsan__actions_.html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-19 07:19:27 +03:00
Azat Khuzhin
dea1706d4e
Fix GROUP BY AggregateFunction (#37093)
* Fix GROUP BY AggregateFunction

finalizeChunk() was unconditionally converting AggregateFunction to the
underlying type, however this should be done only if the aggregate was
applied.

So pass names of aggregates as an argument to the finalizeChunk()

Fuzzer report [1]:

    Logical error: 'Bad cast from type DB::ColumnArray to DB::ColumnAggregateFunction'. Received signal 6 Received signal Aborted (6)

For the following query:

    SELECT
        arraySort(groupArrayArray(grp_simple)),
        grp_aggreg,
        arraySort(groupArrayArray(grp_simple)),
        b,
        arraySort(groupArrayArray(grp_simple)) AS grs
    FROM data_02294
    GROUP BY
        a,
        grp_aggreg,
        b
    SETTINGS optimize_aggregation_in_order = 1

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/37050/323ae98202d80fc4b311be1e7308ef2ac39e6063/fuzzer_astfuzzerdebug,actions//fuzzer.log

v2: fix conflicts in src/Interpreters/InterpreterSelectQuery.cpp
v3: Fix header for GROUP BY AggregateFunction WITH TOTALS
v4: Add sanity check into finalizeBlock()
v5: Use typeid_cast<&> to get more sensible error in case of bad cast (as suggested by @nickitat)
v6: Fix positions passed to finalizeChunk()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Core/ColumnNumbers.h: remove unused <string>

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Optimize finalizeChunk()/finalizeBlock()

v2: s/ByPosition/Mask/ s/by_position/mask/
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-18 23:37:43 +02:00
Vitaly Baranov
7c8956ca8d
Merge pull request #36879 from tonickkozlov/tonickkozlov/lazy-marks-loading
Lazy marks loading
2022-05-18 22:56:46 +02:00
Vitaly Baranov
9ccddc44c6
Merge pull request #35767 from azat/ON_CLUSTER-grant
RFC: Add separate CLUSTER grant
2022-05-18 19:19:54 +02:00
Maksim Kita
df0cb06209
Merge pull request #37289 from kitaisreal/unary-arithmetic-functions-improve-performance-dynamic-dispatch
Improve performance of unary arithmetic functions
2022-05-18 19:16:30 +02:00
Dmitry Novik
6356112a76 Refactor GROUPING function 2022-05-18 15:23:31 +00:00
Mikhail f. Shiryaev
610328263c
Merge pull request #37306 from ClickHouse/release-without-prestable
Release minor and major versions without prestable
2022-05-18 15:44:42 +02:00
Nikolai Kochetov
a19d4c6f1f
Merge pull request #37138 from azat/integration-tests-iptables
tests/integration: fix possible race for iptables user rules inside containers
2022-05-18 14:36:33 +02:00
Mikhail f. Shiryaev
c6e2dd1c43
Create release without draft step 2022-05-18 14:34:41 +02:00
Mikhail f. Shiryaev
1c11823935
Get rid of intermediate prestable release 2022-05-18 14:34:40 +02:00
Mikhail f. Shiryaev
b93a4e2da3
Minor improvements on variables and comments 2022-05-18 14:34:40 +02:00
Mikhail f. Shiryaev
3b1c858bff
Rollback prestable part on failed testing 2022-05-18 14:34:38 +02:00
Mikhail f. Shiryaev
6cedd2f671
Catch all Exceptions in context managers 2022-05-18 14:32:49 +02:00
Anton Popov
715d5b0173
Merge pull request #37270 from Avogar/fix-bool-eof
Fix Nullable(String) to Nullable(Bool/IPv4/IPv6) conversion
2022-05-18 14:08:52 +02:00
Vladimir C
7d88b81622
Merge pull request #37193 from azat/fix-limit-by-in-dist-queries
Fix "Cannot create column of type Set" for distributed queries with LIMIT BY
2022-05-18 13:28:19 +02:00
Nicolae Vartolomei
32b9959dec Allow a user to inspect grants from granted roles 2022-05-18 10:44:18 +00:00
Vladimir C
1779fb08ed
Merge pull request #36271 from yuuch/support_collation_in_create_query 2022-05-18 12:43:49 +02:00
Kruglov Pavel
aaace46da2
Merge pull request #37266 from CurtizJ/fix-mutations-with-object
Fix mutations in tables with columns of type `Object`
2022-05-18 12:19:55 +02:00
lgbo-ustc
44d4ada542 fixed code style 2022-05-18 18:15:16 +08:00
Kruglov Pavel
492de1076c
Merge pull request #37232 from zzsmdfj/fix-mysql-datatype-binary0
fix MySQL database engine to compatible with binary(0) dataType
2022-05-18 12:15:07 +02:00
Kruglov Pavel
2b655ccb75
Speed up test 00157_cache_dictionary 2022-05-18 12:12:41 +02:00
Mikhail f. Shiryaev
381dab1870
Merge pull request #37301 from ClickHouse/fix-check-labels
Update run-check.py to match PR template, add comments
2022-05-18 11:31:48 +02:00
lgbo-ustc
9ed7f2109f fixed black check 2022-05-18 17:02:42 +08:00
lgbo-ustc
afed831785 fixed black check 2022-05-18 14:07:23 +08:00
lgbo-ustc
0578ef9372 add test case. test_hive_query::test_cache_dir_use 2022-05-18 10:26:12 +08:00
mergify[bot]
4900d2249f
Merge branch 'master' into wv-populate 2022-05-18 01:56:52 +00:00
mergify[bot]
c33ca1f392
Merge branch 'master' into system-certificates 2022-05-17 19:52:28 +00:00
Mikhail f. Shiryaev
e6e0f0589d
Update run-check.py to match PR template, add comments 2022-05-17 21:43:22 +02:00
mergify[bot]
05305811f8
Merge branch 'master' into fix-bool-eof 2022-05-17 19:28:11 +00:00
mergify[bot]
36b4ed19c5
Merge branch 'master' into unary-arithmetic-functions-improve-performance-dynamic-dispatch 2022-05-17 18:08:24 +00:00
Alexander Gololobov
38f291c70d
Merge pull request #37030 from bharatnc/ncb/h3-missing-traversal-funcs
add remaining h3 traversal funcs
2022-05-17 18:19:56 +02:00
zzsmdfj
6a8913d2f6 to compatible with binary(0)-adjust code style 2022-05-17 23:08:40 +08:00
avogar
46f4f8a457 Fix use of unitialized memory 2022-05-17 12:59:46 +00:00
zzsmdfj
60ef84bf4c to compatible with binary(0)-fix code style 2022-05-17 20:15:59 +08:00
Maksim Kita
beb34e7062 Improve performance of unary arithmetic functions 2022-05-17 13:53:20 +02:00