Commit Graph

11271 Commits

Author SHA1 Message Date
Amos Bird
c25ef92139
Fix tests 2022-05-24 18:57:55 +08:00
Amos Bird
093d315756
partition pruning for s3 2022-05-24 18:57:55 +08:00
Maksim Kita
712b000f2a
Merge pull request #37443 from kitaisreal/functions-normalize-utf8-fix
Functions normalize utf8 fix
2022-05-24 11:11:15 +02:00
李扬
e33cfc889c
Fix bug of datetime64 parsed from string '1969-12-31 23:59:59.123' (#37039) 2022-05-24 10:47:17 +02:00
Alexander Gololobov
65fbda436a Do computations on the raw input data without copying to Eigen::Matrix 2022-05-24 10:24:50 +02:00
Igor Nikonov
838a6c6f61 Column declaration: [NOT] NULL right after type
+ fixed: data_type_default_nullable=true, it didn't make columns nullable
         if the column declaration contains default expression w/o type

Issue #37229
2022-05-23 22:03:45 +00:00
Maksim Kita
293295815c Fixed tests 2022-05-23 23:44:05 +02:00
mergify[bot]
51ff49a0ee
Merge branch 'master' into i_object_storage 2022-05-23 20:29:49 +00:00
Azat Khuzhin
1b3df39311 tests: fix table in 01710_projection_aggregation_in_order
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Follow-up for: #37342
2022-05-23 23:16:37 +03:00
Alexander Tokmakov
6bc68c0cbc Merge branch 'master' into fixes_for_transactions 2022-05-23 18:49:21 +02:00
avogar
c4f3d8bce1 Fix test 2022-05-23 15:24:58 +00:00
Vladimir C
14a820c2a9
Merge pull request #37336 from vdimir/fix_clash_const_aggegate_join 2022-05-23 17:09:30 +02:00
avogar
d40b0461c5 Update test 2022-05-23 14:25:43 +00:00
avogar
ce4adb447f Fix named tuples output in ORC/Arrow/Parquet formats 2022-05-23 14:21:08 +00:00
vdimir
dabb150a95
Fix cast lowcard of nullable in JoinSwitcher 2022-05-23 13:05:59 +00:00
Maksim Kita
41cb5b4afc RangeHashedDictionary added test 2022-05-23 14:35:26 +02:00
Maksim Kita
fa76f9af34 Update tests 2022-05-23 12:42:00 +02:00
Maksim Kita
d35654226a Fixed tests 2022-05-23 12:42:00 +02:00
Maksim Kita
585b86446e Added hierarchical_index_bytes_allocated column in system.dictionaries 2022-05-23 12:42:00 +02:00
Antonio Andelic
87d445295f
Merge pull request #37342 from azat/projections-optimize_aggregation_in_order-fix
Fix projections with GROUP/ORDER BY in query and optimize_aggregation_in_order
2022-05-23 12:29:16 +02:00
Maksim Kita
e44fec0127 Added tests 2022-05-23 12:21:59 +02:00
Kruglov Pavel
ce48e8e102
Merge pull request #36975 from Avogar/json-columns-formats
Add columnar JSON formats
2022-05-23 12:11:28 +02:00
Kruglov Pavel
754e675ec3
Merge pull request #37253 from Avogar/fix-defaults
Fix inserting defaults for missing values in columnar formats
2022-05-23 12:10:14 +02:00
Kruglov Pavel
9bc74439c1
Merge pull request #37327 from Avogar/arrow-strings
Allow to use String type instead of Binary in Arrow/Parquet/ORC formats
2022-05-23 12:05:33 +02:00
Vasily Nemkov
e481a707aa Fixed test 2022-05-23 11:51:57 +03:00
Robert Schulze
e25ca139cd
Implement SQL functions (NOT) (I)LIKE() + MATCH() with non-const needles
With this commit, SQL functions LIKE and MATCH and their variants can
work with non-const needle arguments. E.g.

  create table tab
    (id UInt32, haystack String, needle String)
    engine = MergeTree()
    order by id;

  insert into tab values
  (1, 'Hello', '%ell%')
  (2, 'World', '%orl%')

  select id, haystack, needle, like(haystack, needle)
  from tab;

For that, methods vectorVector() and vectorFixedVector() were added to
MatchImpl. The existing code for const needles has an optimization where
the compiled regexp is cached. The new code expects a different needle
per row and consequently does not cache the regexp.
2022-05-23 09:41:28 +02:00
Alexey Milovidov
698e5e5352
Merge pull request #37415 from Joeywzr/gen_uuid
Generate multiple columns with UUID
2022-05-23 00:29:42 +03:00
Alexey Milovidov
d32d45e12e
Merge pull request #37400 from ndchikin/window_frame_fix
WindowTransform::moveRowNumber fix
2022-05-22 20:35:00 +03:00
Alexey Milovidov
3b046472fe
Update 02306_window_move_row_number_fix.sql 2022-05-22 20:33:07 +03:00
alesapin
c8d92b87c8 Merge branch 'master' into i_object_storage 2022-05-22 12:16:10 +02:00
Memo
aa503f699a fix tests 2022-05-22 13:43:05 +08:00
Memo
3a17180a4f fix tests 2022-05-22 13:42:36 +08:00
Yakov Olkhovskiy
d878f193d8
Merge pull request #37013 from mnutt/hashid
Add hashid support
2022-05-21 17:14:54 -04:00
Kseniia Sumarokova
ec2a1c8ba5
Merge pull request #37188 from Vxider/wv-alter
ALTER TABLE MODIFY QUERY support for WindowView
2022-05-21 22:59:32 +02:00
Vasily Nemkov
c12f826d22 Implemented changing comment to a ReplicatedMergeTree table 2022-05-21 20:08:30 +03:00
Memo
942af133e5 init 2022-05-21 23:54:12 +08:00
Alexander Tokmakov
d4974ddaf0 fix test 2022-05-20 22:59:55 +02:00
ndchikin
4859108feb WindowTransform::moveRowNumber fix 2022-05-20 20:49:10 +00:00
Alexander Tokmakov
44f2d4529a better waiting, add fault injection 2022-05-20 22:10:01 +02:00
Alexey Milovidov
c77b078c2c
Merge pull request #37367 from ClickHouse/grouping-sets-with-rollup-cube
Disable WITH ROLLUP/CUBE for GROUPING SETS
2022-05-20 22:34:56 +03:00
Dmitry Novik
8c42a7c8f7
Update 02304_grouping_sets_with_rollup_cube.sql 2022-05-20 17:38:35 +02:00
avogar
6e2df9ecc4 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-defaults 2022-05-20 13:15:34 +00:00
Michael Nutt
23dbf1b257 Merge branch 'master' into hashid 2022-05-20 08:42:01 -04:00
vdimir
23a85d3406
Perserve constness in ExpressionActionsChain::JoinStep 2022-05-20 11:31:58 +00:00
avogar
a6a430c5ee Merge branch 'master' of github.com:ClickHouse/ClickHouse into json-columns-formats 2022-05-20 11:08:30 +00:00
avogar
bb2fb48ad7 Fix tests 2022-05-20 10:53:20 +00:00
Vxider
020a868810 rename test 2022-05-20 10:53:06 +00:00
Vxider
063f11642e update test 2022-05-20 10:50:38 +00:00
Vxider
956459eba2 Merged with master 2022-05-20 10:50:21 +00:00
mergify[bot]
1ac4199e78
Merge branch 'master' into arrow-strings 2022-05-20 10:43:33 +00:00
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
Alexander Tokmakov
12bbb7de87 fix race on TID allocation 2022-05-20 12:41:44 +02:00
alesapin
654b27e307 Merge branch 'master' into i_object_storage 2022-05-20 11:56:13 +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
Alexey Milovidov
a02115f104
Update 02304_grouping_sets_with_rollup_cube.sql 2022-05-20 02:50:38 +03:00
Dmitry Novik
86d48e1c99 Disable WITH ROLLUP/CUBE for GROUPING SETS 2022-05-19 14:10:04 +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
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
Vxider
1cc347364f Merged with master 2022-05-19 12:45:46 +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
Kruglov Pavel
6e158a7996
Mark test as no-parallel 2022-05-19 12:53:40 +02:00
Kruglov Pavel
0092b3e6b5
Mark test as no-parallel 2022-05-19 12:52:52 +02:00
mergify[bot]
efdb49a222
Merge branch 'master' into arrow-strings 2022-05-19 10:48:41 +00: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
avogar
f69c3175af Fix comments 2022-05-19 10:13:44 +00:00
Azat Khuzhin
e32b695775 Fix projections with GROUP/ORDER BY in query and optimize_aggregation_in_order
With projections, GROUP BY/ORDER BY in query, optimize_aggregation_in_order,
GROUP BY's InputOrderInfo was used incorrectly for ORDER BY.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-19 13:11:22 +03:00
avogar
a71f9eb9e4 Merge branch 'fix-array-map-nothing' of github.com:Avogar/ClickHouse into fix-array-map-nothing 2022-05-19 09:02:02 +00:00
Kruglov Pavel
9411406a9c
Update test 2022-05-19 09:25:59 +02:00
avogar
cb8646fbb4 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-array-map-nothing 2022-05-19 07:18:48 +00: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
Michael Nutt
c87638d2ba put hashid behind allow_experimental_hash_functions setting 2022-05-18 19:06:33 -04: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
alesapin
d4abbf54b0
Update 00170_s3_cache.sql 2022-05-18 23:21:07 +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
vdimir
2995b69f4a
Swap order of converting_join_columns and before_join steps 2022-05-18 19:31:14 +00:00
Michael Nutt
e453132db8 remove hashid define guard 2022-05-18 15:26:54 -04: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
Kruglov Pavel
ff59ccd3c7
Update test 2022-05-18 17:43:28 +02:00
Kruglov Pavel
de14e35e47
Fix fast test 2022-05-18 17:16:08 +02:00
Vxider
d10b64468e update code style 2022-05-18 15:00:08 +00:00
avogar
a0369fb9a6 Allow to use String type instead of Binary in Arrow/Parquet/ORC formats 2022-05-18 14:51:21 +00:00
Vxider
04f1b20229 init inner window names 2022-05-18 14:34:40 +00:00
alesapin
19462bdf9e Drop filesystem cache before test 2022-05-18 14:31:28 +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
Vladimir C
1779fb08ed
Merge pull request #36271 from yuuch/support_collation_in_create_query 2022-05-18 12:43:49 +02:00
alesapin
e99c90118e Merge branch 'master' into i_object_storage 2022-05-18 12:36:22 +02:00
avogar
b33ad449a9 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-defaults 2022-05-18 10:26:38 +00: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
Bharat Nallan Chakravarthy
c476b8dd92 Merge remote-tracking branch 'upstream/master' into ncb/h3-unidirectionaledges-funcs 2022-05-17 20:10:03 -07: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