Commit Graph

92239 Commits

Author SHA1 Message Date
Maksim Kita
00372e4646 Fixed tests 2022-06-29 11:05:36 +02:00
Alexander Tokmakov
2aa6c66a2e
Merge pull request #38488 from azat/fix-02335_column_ttl_expired_column_optimization
tests: cleanup tmp data in 02335_column_ttl_expired_column_optimization
2022-06-29 12:05:23 +03:00
Maksim Kita
24e8ba5f9a
Merge pull request #38540 from ClickHouse/update-poco
Update poco
2022-06-29 11:02:43 +02:00
Robert Schulze
f14c32e15c
Merge pull request #38546 from ClickHouse/builderbintidy
Rename slightly weirdly named "BuilderBinTidy" to "BuilderClangTidy"
2022-06-29 10:22:38 +02:00
Robert Schulze
bb441faa42
Merge pull request #38491 from ClickHouse/clang-tidy-in-branches
Fix some clang-tidy warnings in headers
2022-06-29 10:22:04 +02:00
Robert Schulze
fd31147727
Merge pull request #37852 from michael1589/master
compile the new libgsasl to supportting hadoop secure rpc transfer(supports hadoop.rpc.protection=privacy/integrity/authentication)
2022-06-29 09:39:58 +02:00
Alexey Milovidov
0d27672ac8
Merge pull request #38440 from xiedeyantu/allow_trailing_comma
Allow trailing comma in columns list
2022-06-29 09:47:09 +03:00
Alexey Milovidov
e7dbe526f8
Update ParserCreateQuery.cpp 2022-06-29 09:46:45 +03:00
Alexey Milovidov
4cda5491f6
Merge pull request #38542 from ClickHouse/unique_lock-to-lock_guard
Don't use std::unique_lock unless we need to
2022-06-29 09:40:56 +03:00
Alexey Milovidov
dea3b5bfce
Revert "Non Negative Derivative window function" 2022-06-29 08:56:15 +03:00
Vladimir Chebotarev
f7ef571842 Don't spoil return code of integration tests runner with redundant tee. 2022-06-29 06:11:09 +03:00
jianmei zhang
d75af09f74 Fix style error 2022-06-29 11:08:05 +08:00
jianmei zhang
8d49aa4697 Support sql standard drop index in seprate parser files 2022-06-29 11:08:05 +08:00
jianmei zhang
589cba8045 Support sql standard create index in seprate parser files 2022-06-29 11:08:05 +08:00
jianmei zhang
9154aec201 Fix compile error 2022-06-29 11:08:05 +08:00
jianmei zhang
d6b0bc2942 Add test case 2022-06-29 11:08:05 +08:00
Jianmei Zhang
13231d6a85 Pass command type for create and drop index 2022-06-29 11:08:05 +08:00
Jianmei Zhang
4d0635371f Support sql stanard create and drop index 2022-06-29 11:08:05 +08:00
HeenaBansal2009
d5886e4861 Updated Index file for GeoFunctions 2022-06-28 19:24:06 -07:00
lgbo-ustc
ee30c4a3f7 update test scripts 2022-06-29 10:23:00 +08:00
lgbo-ustc
7274169c33 update test scripts 2022-06-29 10:03:10 +08:00
mergify[bot]
beef90674f
Merge branch 'master' into master 2022-06-29 01:00:34 +00:00
Nikita Taranov
f5d26572df
Quick fix for aggregation pipeline (#38295) 2022-06-29 01:16:30 +02:00
Igor Nikonov
4a00e33e6b Fixes for some review comments 2022-06-28 21:42:46 +00:00
Robert Schulze
f5bfc2c27b
BuilderBinClangTidy 2022-06-28 22:29:17 +02:00
Robert Schulze
5048d384b2
BuilderBinClangTidy 2022-06-28 22:28:19 +02:00
Igor Nikonov
c1840e798c Fix: wrong header variable was used 2022-06-28 20:15:16 +00:00
Igor Nikonov
d80a21a445 Distinct sorted: calculate column positions once in constructor
- instead of calculating them on every chunk
2022-06-28 19:59:05 +00:00
Azat Khuzhin
4a52d3f6b9 tests: update reference for 00597_push_down_predicate_long
CI: https://s3.amazonaws.com/clickhouse-test-reports/37887/6b4613c88056f3901f6d8a832c9e2bc15e22206d/stateless_tests__aarch64__actions_.html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-28 22:53:03 +03:00
Azat Khuzhin
f86ddebada Add sanity check for UNION header
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-28 22:53:03 +03:00
Azat Khuzhin
d98336ad83 Fix incorrect columns order in subqueries of UNION
Consider the following query:

    SELECT avgWeighted(x, y) FROM (SELECT NULL, 255 AS x, 1 AS y UNION ALL SELECT y, NULL AS x, 1 AS y)

Here is UNION from two SELECT queries
- `SELECT NULL, 255 AS x, 1 AS y`
- `SELECT y, NULL AS x, 1 AS y`

UNION queries matches columns by positions, not names, so the following
columns should be used by `avgWeighted()`:
- `255 AS x,  1 AS y`
- `NULL AS x, 1 AS y`

Result types of arguments should be:
- `x Nullable(UInt8)`
- `y UInt8`

And in case of UNION query is a subselect itself, it will return only
required columns, for the example above it needs only `x` and `y`.
For this it will get positions of these arguments from the first query,
and then use those positions to get required column names from the
second query (since there is no ability to get columns by positions
instead of names internally), and due to duplicated columns the second
query will return (`y`, `x`) not (`x`, `y`), and this will make the
result incorrect:

    EXPLAIN header = 1, optimize = 0, actions=1 SELECT avgWeighted(x, y) FROM (SELECT NULL, 255 AS x, 1 AS y UNION ALL SELECT y, NULL AS x, 1 AS y)

    Aggregates:
        avgWeighted(x, y)
          Function: avgWeighted(Nullable(UInt8), UInt8) → Nullable(Float64)
          Arguments: x, y
          Argument positions: 0, 1
      Expression (Before GROUP BY)
      Header: x UInt8
              y Nullable(UInt8)
      ...
      Union
      Header: x UInt8
              y Nullable(UInt8)
        Expression (Conversion before UNION)
        Header: x UInt8
                y Nullable(UInt8)
        Expression (Conversion before UNION)
        Header: x UInt8
                y Nullable(UInt8)

And the query itself fails with an error:

    Logical error: 'Bad cast from type DB::ColumnVector<char8_t> to DB::ColumnNullable'.

_NOTE: `avgWeighted()` here is required to trigger `LOGICAL_ERROR`_

CI: https://s3.amazonaws.com/clickhouse-test-reports/37796/e637489f81768df582fe7389e57f7ed12893087c/fuzzer_astfuzzerdebug,actions//report.html
Fixes: 02227_union_match_by_name
v2: fix untuple() (reserve space for output_columns_positions too)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-28 22:53:03 +03:00
Azat Khuzhin
563fac5333 tests: add a test for incorrect header in UNION queries
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-28 22:53:03 +03:00
Azat Khuzhin
ee0f2651ee Revert "Fix converting types for UNION queries (may produce LOGICAL_ERROR)"
This fix is incorrect, and it introduce new issues, in particular it
may breaks UNION queries w/o column aliases, i.e.:

    SELECT a, b, c FROM (SELECT 3 AS a, 2147483647 AS b, 1048575 AS c UNION ALL SELECT -2, NULL, -2) AS js1 ORDER BY a

CI: https://s3.amazonaws.com/clickhouse-test-reports/37796/e637489f81768df582fe7389e57f7ed12893087c/fuzzer_astfuzzerdebug,actions//report.html
Reverts: #37593/#34775 (2613149f6b)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-28 22:50:01 +03:00
Robert Schulze
75f7662ebb
Rename slightly weirdly named "BuilderBinTidy" to "BuilderClangTidy" 2022-06-28 19:47:00 +00:00
Azat Khuzhin
1648cd0eb0 tests: cleanup tmp data in 02335_column_ttl_expired_column_optimization
v2: remove trap usage as requested by @tavplubix
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-28 22:43:09 +03:00
mergify[bot]
a1d7b1dbf3
Merge branch 'master' into master 2022-06-28 19:36:07 +00:00
Julian Gilyadov
d0d72e0b5e
Implement L2Squared Distance and Norm 2022-06-28 15:28:58 -04:00
Robert Schulze
f692ead6ad
Don't use std::unique_lock unless we have to
Replace where possible by std::lock_guard which is more light-weight.
2022-06-28 19:19:06 +00:00
mergify[bot]
3f266954f0
Merge branch 'master' into deprecate_ordinary_database 2022-06-28 18:13:36 +00:00
Raúl Marín
9b4da86e2e Adapt table creation with replication to avoid issues with pre-22.4 replicas 2022-06-28 20:12:07 +02:00
Alexander Tokmakov
0bb036dd21
Update Dockerfile 2022-06-28 20:35:20 +03:00
Maksim Kita
2b11c0daa9 Updated tests 2022-06-28 19:26:15 +02:00
Yakov Olkhovskiy
e78db73078 update poco 2022-06-28 12:56:43 -04:00
Robert Schulze
30f136867f
Fix build 2022-06-28 16:52:17 +00:00
Yakov Olkhovskiy
52d6b45a09 update poco 2022-06-28 12:37:07 -04:00
Ilya Yatsishin
400c8ad7a4
Merge pull request #38505 from jrdi/patch-1
Specify that write quorum can be activated
2022-06-28 18:11:09 +02:00
Mikhail f. Shiryaev
e1ac7477c9
Avoid killing terminate-instances task 2022-06-28 17:51:47 +02:00
mergify[bot]
4a1fefb42d
Merge branch 'master' into deprecate_ordinary_database 2022-06-28 15:49:52 +00:00
Alexander Tokmakov
66cf6da35c
Merge pull request #38518 from ClickHouse/tavplubix-patch-1
Fix `_csv.Error: field larger than field limit`
2022-06-28 18:46:43 +03:00
GruffGemini
9fc7c9f575
Update group-by.md
docs (group-by.md): fixed broken links
2022-06-28 17:55:16 +03:00