Commit Graph

69552 Commits

Author SHA1 Message Date
Kseniia Sumarokova
3d347065a8
Merge pull request #27194 from azat/query_log_used-on-error
Save information about used functions/tables/... into query_log on error
2021-08-05 09:15:09 +03:00
Ildus Kurbangaliev
2ed7e02079 Fix snapshots for mapPopulateSeries function 2021-08-05 11:11:41 +05:00
Amos Bird
a1dd7e5c97
Split mutex into individual regexp construction. 2021-08-05 13:59:47 +08:00
Amos Bird
665f735044
Add some test 2021-08-05 10:50:11 +08:00
Azat Khuzhin
dee27fcbb9 Fix on-disk format breakage for secondary indices over Nullable column
[1] breaks on disk format (and the relevant change in the:

  [1]: https://github.com/ClickHouse/ClickHouse/pull/12455#discussion_r682830812

Too bad that I checked this patchset only for compatibility after
reverting this patch [2] (use case: I've applied it manually, then
revert it, and data skipping indexes over Nullable column had been
broken)

  [2]: https://github.com/ClickHouse/ClickHouse/pull/12455#issuecomment-823423772

But this patchset actually breaks compatibility with older versions of
clickhouse for Nullable data skipping indexes after simple upgrade:

Here is a simple reproducer:

    --
    -- run this with 21.6 or similar (i.e. w/o this patch)
    --

    CREATE TABLE data
    (
        `key` Int,
        `value` Nullable(Int),
        INDEX value_index value TYPE minmax GRANULARITY 1
    )
    ENGINE = MergeTree
    ORDER BY key;

    INSERT INTO data SELECT
        number,
        number
    FROM numbers(10000);

    SELECT * FROM data WHERE value = 20000 SETTINGS force_data_skipping_indices = 'value_index' SETTINGS force_data_skipping_indices = 'value_index', max_rows_to_read=1;

Now upgrade and run the query again:

    SELECT * FROM data WHERE value = 20000 SETTINGS force_data_skipping_indices = 'value_index' SETTINGS force_data_skipping_indices = 'value_index', max_rows_to_read=1;

And it will fail because of on disk format changes:

    $ ll --time-style=+ data/*/data/all_1_1_0/skp*.idx
    -rw-r----- 1 azat azat 36  data/with_nullable_patch/data/all_1_1_0/skp_idx_value_index.idx
    -rw-r----- 1 azat azat 37  data/without_nullable_patch/data/all_1_1_0/skp_idx_value_index.idx

    $ md5sum data/*/data/all_1_1_0/skp*.idx
    a19c95c4a14506c65665a1e30ab404bf  data/with_nullable_patch/data/all_1_1_0/skp_idx_value_index.idx
    e50e2fcfa873b232196623d56ab26105  data/without_nullable_patch/data/all_1_1_0/skp_idx_value_index.idx

Note, that there is no stable release with this patch included yet, so
no need to backport.

Also note that you may create data skipping indexes over Nullable
column even before [3].

  [3]: https://github.com/ClickHouse/ClickHouse/pull/12455

v2: break cases when granulas has Null in values due to backward
compatibility
2021-08-05 00:19:38 +03:00
Azat Khuzhin
f710f1e954 Cover data skipping indices on disk format (compare with 21.6) 2021-08-05 00:19:32 +03:00
kssenii
f06703a7c9 Support schema for postgres database engine 2021-08-04 20:52:45 +00:00
Azat Khuzhin
8a7c9e1124 Fix polling of /sys/block
- rescan /sys/block on errors (disk had been replaced and you will got
  ENOENT)
- rescan /sys/block periodically (each 5m), for newly added devices
  (i.e. new disk to RAID array can be added)
2021-08-04 22:41:53 +03:00
Anton Popov
2b6dc35d9f
Merge pull request #27122 from amosbird/datedatetimecomp
Specialize date time comparision.
2021-08-04 21:44:48 +03:00
Azat Khuzhin
7a47327980 Fix used_storages by using log_queries from local context
I don't have log_queries enabled by default.
2021-08-04 21:44:19 +03:00
Azat Khuzhin
643c31d6f3 Save information about used functions/tables/... into query_log on error 2021-08-04 21:44:18 +03:00
Alexander Tokmakov
d4fbd7107e try make flags more readable 2021-08-04 21:14:59 +03:00
Anton Popov
9586bb7e90 fix pvs 2021-08-04 20:42:22 +03:00
Anton Popov
9a9aebc644 fix tests 2021-08-04 20:38:10 +03:00
tavplubix
538958aee6
Delete 01160_detached_parts.sql 2021-08-04 20:05:57 +03:00
Ilya Yatsishin
553fed9ad5
Merge pull request #27095 from qoega/amqp-cpp-update 2021-08-04 19:48:52 +03:00
Alexander Kuzmenkov
cfcb0e4b22 properly check the settings in perf test 2021-08-04 19:41:21 +03:00
Ildus Kurbangaliev
8e347bab99 Fix error in testflows related with mapPopulateSeries 2021-08-04 20:21:37 +05:00
Anton Popov
915ef50c2d optimize reading in order of key more 2021-08-04 18:18:03 +03:00
Alexander Kuzmenkov
b190e499ee fixup 2021-08-04 17:46:25 +03:00
Alexander Kuzmenkov
0730e685b0 Mark window functions ready for general use. 2021-08-04 17:45:32 +03:00
Alexander Tokmakov
23f8b3d07d fix part name parsing in system.detached_parts 2021-08-04 17:42:48 +03:00
Kseniia Sumarokova
f58727b50f
Merge pull request #27060 from kssenii/library-bridge-fixes
library bridge fixes
2021-08-04 17:12:09 +03:00
Amos Bird
b80065ab59
Try our best to log query_kind 2021-08-04 22:09:23 +08:00
Anton Ivashkin
61016da2b1 Set allow_remote_fs_zero_copy_replication to true by default 2021-08-04 17:08:09 +03:00
vdimir
b8558a1716
Fix uninitialized memory in functions multiSearch* with empty array 2021-08-04 16:44:39 +03:00
Maksim Kita
3f48c85722 StorageSystemReplicas added column replica_is_active 2021-08-04 16:19:42 +03:00
adevyatova
9b9c6e02d1 Applied suggestion from code review 2021-08-04 12:34:50 +00:00
Ildus Kurbangaliev
d8ce46ea74 Show more details in testflows checks 2021-08-04 17:20:35 +05:00
Maksim Kita
4dc4854fad
Merge pull request #27168 from excitoon-favorites/safers3readbuffer
Safer `ReadBufferFromS3` for merges and backports
2021-08-04 15:01:21 +03:00
Maksim Kita
a0be68fcd0
Merge pull request #27173 from lushndm/patch-2
Update gui.md
2021-08-04 15:00:51 +03:00
Maksim Kita
29663cf5af
Merge pull request #27172 from lushndm/patch-1
Update table-engines documentation.
2021-08-04 15:00:43 +03:00
adevyatova
61ddc53e26 Fixed links 2021-08-04 11:51:22 +00:00
adevyatova
5bd665bfba Add ru docs 2021-08-04 11:47:27 +00:00
adevyatova
5c39ae981c Add desc for currentProfiles, enabledProfiles, defaultProfiles func 2021-08-04 11:26:24 +00:00
tavplubix
0dbcbc28ba
Merge pull request #27164 from nicelulu/fix_0_stateless_01034
Fix CURR_DATABASE empty for 01034_move_partition_from_table_zookeeper.sh
2021-08-04 13:50:06 +03:00
adevyatova
bb8c6813a1 Update 2021-08-04 10:15:50 +00:00
alexey-milovidov
9d580732cc
Merge pull request #27154 from elmalto/patch-1
Add session_id for DBeaver to documentation
2021-08-04 13:06:47 +03:00
Dmitriy Lushnikov
659b874934
Update gui.md 2021-08-04 13:02:11 +03:00
Artur Filatenkov
9b9982ee3d correct test with deleting files after usage 2021-08-04 12:53:41 +03:00
Dmitriy Lushnikov
77ade599d3
Update index.md 2021-08-04 12:52:30 +03:00
kolsys
e740d8e643
Update play.html
Allow to pass query settings via server URI
2021-08-04 12:48:56 +03:00
Anna
246a14b280
Merge branch 'ClickHouse:master' into master 2021-08-04 11:48:37 +03:00
Vladimir C
d9c9422a44
Merge pull request #27078 from vdimir/pmj-empty-set 2021-08-04 11:15:46 +03:00
Vladimir Chebotarev
cc32a61488 Fix. 2021-08-04 10:40:02 +03:00
Vladimir Chebotarev
c2410920d3 Safer ReadBufferFromS3 for merges and backports. 2021-08-04 09:14:20 +03:00
Anna
639408b57f
Merge branch 'ClickHouse:master' into master 2021-08-04 07:39:41 +03:00
zhangxiao871
6a5925b6ce Fix CURR_DATABASE empty for 01034_move_partition_from_table_zookeeper.sh 2021-08-04 11:07:39 +08:00
alexey-milovidov
63b90bec6c
Merge pull request #27131 from kitaisreal/global-subqueries-visitor-external-storage-check-fix
GlobalSubqueriesVisitor external storage check fix
2021-08-04 03:11:56 +03:00
kssenii
cc2c1b80df Fix tests 2021-08-03 19:47:59 +00:00