Commit Graph

11101 Commits

Author SHA1 Message Date
Kruglov Pavel
4dd447b232
Merge pull request #37332 from Avogar/schema-inference-with-globs
Apply input_format_max_rows_to_read_for_schema_inference for all files in globs in total
2022-05-20 12:42:32 +02:00
Kseniia Sumarokova
ee295038fa
Merge pull request #37214 from Vxider/wv-engine
Change ENGINE behavior in WindowView
2022-05-20 11:14:19 +02: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
Vxider
56ec467ba7 update tests 2022-05-19 13:04:15 +00:00
Vxider
f6cc73235b Merged with master 2022-05-19 13:03:45 +00: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
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
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
Kruglov Pavel
9411406a9c
Update test 2022-05-19 09:25:59 +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
Vxider
3e05054792 disable parallel test 2022-05-19 01:48:47 +00: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
avogar
cd6a29897e Apply input_format_max_rows_to_read_for_schema_inference for all files in globs in total 2022-05-18 17:56:36 +00: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
Vxider
d10b64468e update code style 2022-05-18 15:00:08 +00:00
Vxider
04f1b20229 init inner window names 2022-05-18 14:34:40 +00: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
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
Kruglov Pavel
2b655ccb75
Speed up test 00157_cache_dictionary 2022-05-18 12:12:41 +02:00
mergify[bot]
37d6da7506
Merge branch 'master' into wv-engine 2022-05-18 01:56:56 +00: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
mergify[bot]
05305811f8
Merge branch 'master' into fix-bool-eof 2022-05-17 19:28:11 +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
Vxider
0627a3d23a disable parallel tests 2022-05-17 14:24:05 +00:00
avogar
46f4f8a457 Fix use of unitialized memory 2022-05-17 12:59:46 +00:00
Vitaly Baranov
f34a5cdee2
Merge branch 'master' into ON_CLUSTER-grant 2022-05-17 13:21:20 +02:00
Vxider
e03d6009cc update tests 2022-05-17 08:26:22 +00:00
Vxider
f74c934a61 Merged with master 2022-05-17 02:53:59 +00:00
mergify[bot]
0d0fc23170
Merge branch 'master' into wv-engine 2022-05-17 02:24:18 +00:00
Kseniia Sumarokova
94683786dc
Merge branch 'master' into MeiliSearch 2022-05-16 22:42:09 +02:00
Alexander Gololobov
e2e3536a80 Fixed handling of gridPathCellsSize() errors 2022-05-16 21:23:45 +02:00
avogar
415aabd4d0 Fix Nullable(String) to Nullable(Bool/IPv4/IPv6) conversion 2022-05-16 19:15:18 +00:00
Anton Popov
b6c5ab4fcf fix mutations in tables with columns of type Object 2022-05-16 18:26:53 +00:00
Vxider
d7dcb1f5d9 update test 2022-05-16 17:49:14 +00:00
Yakov Olkhovskiy
863c52f0f4 refactoring, test added 2022-05-16 13:31:28 -04:00
Dmitry Novik
dd1e7b55b8
Merge pull request #37050 from azat/fix-optimize_aggregation_in_order-prefix-Array
Fix optimize_aggregation_in_order with prefix GROUP BY and *Array aggregate functions
2022-05-16 17:17:56 +02:00
Anton Popov
9c3daf7e5b
Merge pull request #37245 from ClickHouse/CurtizJ-patch-4-1
Temporarily fix flaky test `01825_type_json_insert_select.sql`
2022-05-16 16:44:27 +02:00
Kruglov Pavel
5e34f48a18
Merge pull request #37021 from excitoon-favorites/fixtdigest
Fixed problem with infs in `quantileTDigest`
2022-05-16 15:21:59 +02:00
mergify[bot]
753fac95ef
Merge branch 'master' into wv-watch-limit 2022-05-16 11:42:31 +00:00
alesapin
1829256ae2
Merge pull request #37178 from ClickHouse/ignore_auto_increment_in_create_table_2
Ignore AUTO_INCREMENT in CREATE TABLE to simplify migration from MySQL
2022-05-16 13:29:22 +02:00
Anton Popov
848b762eb0 Update 01825_type_json_insert_select.sql 2022-05-16 11:18:31 +00:00
Azat Khuzhin
01e1c5345a Add separate CLUSTER grant
In case you have different roles for the same user on multiple clusters,
ON CLUSTER query can help to overcome some limitations.

Consider the following example:
- cluster_with_data, dev_user (readonly=2)
- stage_cluster, dev_user (readonly=0)

So when you will execute the following query from stage_cluster, it will
be successfully executed, since ON CLUSTER queries has different system
profile:

    DROP DATABASE default ON CLUSTER cluster_with_data

This is not 100% safe, but at least something.

Note, that right now only ON CLUSTER query it self is supported, but
separate clusters are not (i.e. GRANT CLUSTER some_cluster_name TO
default), since right now grants sticked to database+.

v2: on_cluster_queries_require_cluster_grant
v3: fix test and process flags as bit mask
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-16 13:57:45 +03:00
Vladimir C
75008d5903
Merge pull request #37166 from vdimir/issue_37141 2022-05-16 12:21:41 +02:00
Vladimir Chebotarev
5bbab401c4 Added test. 2022-05-15 22:49:52 +03:00