Commit Graph

25059 Commits

Author SHA1 Message Date
Maksim Kita
ca89af89a1
Merge pull request #36088 from israelg99/fix_executable
Fix CH silently failing when it cannot execute a file
2022-04-13 16:53:00 +02:00
Alexander Tokmakov
40fea2b833 do not unfold {uuid} macro 2022-04-13 16:51:59 +02:00
Vladimir C
77dac8e490
Merge pull request #36179 from CurtizJ/dynamic-columns-10 2022-04-13 15:57:32 +02:00
mergify[bot]
2c5d6d132e
Merge branch 'master' into cache-fix 2022-04-13 13:32:56 +00:00
kssenii
0912b038fa Merge master 2022-04-13 15:30:01 +02:00
Azat Khuzhin
6dbc138e76 Remove duplicated parts removal from mutation.
This commit reverts 701e2ffd79 ("Fix
possible mutation stuck due to race with DROP_RANGE"), and also adds
some clarification comments.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-13 16:09:17 +03:00
kssenii
05ceae428b Fix tests 2022-04-13 14:54:43 +02:00
mergify[bot]
4fb66013fe
Merge branch 'master' into memory-tracking-overloads 2022-04-13 12:40:49 +00:00
Alexander Tokmakov
f2c4f88295 avoid moving replicated tables to Ordinary db 2022-04-13 14:38:20 +02:00
avogar
348cae0d16 Fix possible segfault in schema inference for JSON formats 2022-04-13 12:34:40 +00:00
tavplubix
43de4827d7
Merge pull request #36074 from ClickHouse/zookeeper_log_thread_query_id
Add thread_id and query_id to zookeeper_log
2022-04-13 15:34:04 +03:00
Kseniia Sumarokova
9ae047df1d
Update CachedReadBufferFromRemoteFS.cpp 2022-04-13 14:30:10 +02:00
kssenii
a6dc437911 Merge master 2022-04-13 14:23:48 +02:00
Alexey Milovidov
ab80b94f45
Update ThreadPool.cpp 2022-04-13 15:18:49 +03:00
mergify[bot]
ba22cb76bb
Merge branch 'master' into master2 2022-04-13 11:51:43 +00:00
Kruglov Pavel
b2905c5aed
Update src/IO/ParallelReadBuffer.cpp
Co-authored-by: tavplubix <tavplubix@gmail.com>
2022-04-13 13:50:11 +02:00
Kruglov Pavel
03fc08cec3
Merge pull request #36137 from azat/client-profile-events
ProfileEvents fixes
2022-04-13 12:27:39 +02:00
avogar
a4d74f975e Use atomic instead of mutex + condvar in ParallelReadBuffer 2022-04-13 10:20:29 +00:00
Kseniia Sumarokova
07cfa980ac
Update FileCache.h 2022-04-13 12:08:25 +02:00
Kruglov Pavel
96a73a3392
Merge pull request #36169 from Avogar/fix-parallel-read-buffer
Fix crash in ParallelReadBuffer
2022-04-13 12:07:05 +02:00
Nikolai Kochetov
362fcfd2b8
Merge pull request #36075 from ClickHouse/fix-limit-push-down-over-window
Disable LIMIT push down through WINDOW functions.
2022-04-13 11:57:37 +02:00
Kseniia Sumarokova
44ecfd925b
Update FileSegment.cpp 2022-04-13 11:35:46 +02:00
Kseniia Sumarokova
053892777f
Update FileSegment.cpp 2022-04-13 11:35:12 +02:00
Kseniia Sumarokova
a611566266
Update FileCache.h 2022-04-13 11:33:15 +02:00
Kseniia Sumarokova
1b267462d8
Update CachedReadBufferFromRemoteFS.cpp 2022-04-13 11:27:47 +02:00
Kseniia Sumarokova
d9ce08915a
Merge pull request #36130 from yuuch/support_MySQL_style_FORMAT_Vertical_before_semicolon
support  '\G;' at the end of query
2022-04-13 10:39:40 +02:00
Kseniia Sumarokova
6b6671e89f
Merge pull request #36164 from azat/client-local-format-error
clickhouse-client: properly cancel query in case of error during formatting data
2022-04-13 10:37:35 +02:00
Antonio Andelic
835f752a1a Add maybe_unused for align arguments 2022-04-13 06:19:59 +00:00
Azat Khuzhin
891c601589 Fix ProfileEvents overlaps (for multiple queries) in clickhouse-local
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-12 22:27:12 +03:00
Azat Khuzhin
54a1cea7fd Send ProfileEvents in clickhouse-local on query finish (like server does)
v2: send only for pulling pipelines
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-12 22:26:44 +03:00
Yakov Olkhovskiy
3d52afed71 only check columns sets intersection, some refactoring 2022-04-12 15:10:11 -04:00
Anton Popov
0679d4814d allow to convert empty string to objects 2022-04-12 18:58:40 +00:00
tavplubix
303ecc6f7d
Merge pull request #36136 from ClickHouse/transactions_fix_1
Minor fix for transactions
2022-04-12 21:38:47 +03:00
Azat Khuzhin
1a8b49b535 Remove redundant check from LocalConnection::finishQuery()
It is called from only one place, and under state->is_finished, so state
is there.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-12 21:18:52 +03:00
Azat Khuzhin
097e2f626d Do not overlap profile events snapshots for queries
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-12 20:54:56 +03:00
Azat Khuzhin
e38057ddb0 Fix code alignment in ProfileEventsExt
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-12 20:54:56 +03:00
Azat Khuzhin
d9dd8f5f65 Fix filtering out snapshots from profile events
This fixes POSITION_OUT_OF_BOUND error:

    $ clickhouse-client --print-profile-events --profile-events-delay-ms=-1 -n -q 'select sleep(1); select 1'
    0
    [p1.azat.localdomain] 2022.04.12 19:31:48 [ 0 ] ContextLock: 9 (increment)
    [p1.azat.localdomain] 2022.04.12 19:31:48 [ 0 ] FunctionExecute: 1 (increment)
    [p1.azat.localdomain] 2022.04.12 19:31:49 [ 0 ] MemoryTrackerUsage: 2132102 (gauge)
    [p1.azat.localdomain] 2022.04.12 19:31:49 [ 0 ] NetworkReceiveElapsedMicroseconds: 139 (increment)
    [p1.azat.localdomain] 2022.04.12 19:31:49 [ 0 ] NetworkSendBytes: 4850 (increment)
    [p1.azat.localdomain] 2022.04.12 19:31:49 [ 0 ] NetworkSendElapsedMicroseconds: 1844 (increment)
    [p1.azat.localdomain] 2022.04.12 19:31:48 [ 0 ] Query: 1 (increment)
    [p1.azat.localdomain] 2022.04.12 19:31:48 [ 0 ] RWLockAcquiredReadLocks: 1 (increment)
    [p1.azat.localdomain] 2022.04.12 19:31:48 [ 0 ] SelectQuery: 1 (increment)
    [p1.azat.localdomain] 2022.04.12 19:31:48 [ 0 ] SelectedBytes: 1 (increment)
    [p1.azat.localdomain] 2022.04.12 19:31:48 [ 0 ] SelectedRows: 1 (increment)
    [p1.azat.localdomain] 2022.04.12 19:31:49 [ 0 ] OSCPUVirtualTimeMicroseconds: 1842 (increment)
    [p1.azat.localdomain] 2022.04.12 19:31:49 [ 0 ] OSReadChars: 426 (increment)
    [p1.azat.localdomain] 2022.04.12 19:31:49 [ 0 ] OSWriteChars: 322 (increment)
    [p1.azat.localdomain] 2022.04.12 19:31:49 [ 0 ] RealTimeMicroseconds: 1002689 (increment)
    [p1.azat.localdomain] 2022.04.12 19:31:49 [ 0 ] SleepFunctionCalls: 1 (increment)
    [p1.azat.localdomain] 2022.04.12 19:31:49 [ 0 ] SleepFunctionMicroseconds: 1000000 (increment)
    [p1.azat.localdomain] 2022.04.12 19:31:49 [ 0 ] UserTimeMicroseconds: 1843 (increment)
    1
    Error on processing query: Code: 11. DB::Exception: Position out of bound in Block::erase(), max position = 5. (POSITION_OUT_OF_BOUND) (version 22.4.1.1)
    (query: select 1)

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-12 20:54:56 +03:00
Azat Khuzhin
1fa3e6a426 Fix printing ProfileEvents on client for multiple queries
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-12 20:54:56 +03:00
Rajkumar
c711e42b62 argument changed to const ref 2022-04-12 09:31:32 -07:00
Julian Gilyadov
a4f56f3330
Throw exception when file cant be executed instead of displaying success 2022-04-12 17:52:44 +02:00
Rajkumar
92c01c7a8c space removed 2022-04-12 07:37:48 -07:00
Rajkumar
14cb87e3ef password hash salt feature 2022-04-12 07:30:09 -07:00
Yakov Olkhovskiy
5868539605 check only if TO table exists 2022-04-12 10:17:39 -04:00
Antonio Andelic
1b4cebcfb6 Add new/delete overloads 2022-04-12 14:11:10 +00:00
avogar
de9c9462e5 Fix crash in ParallelReadBuffer 2022-04-12 13:54:53 +00:00
mergify[bot]
0b3c15c07a
Merge branch 'master' into projection-fix1 2022-04-12 13:49:28 +00:00
Yakov Olkhovskiy
25101de7e2 check only selected columns against destination table 2022-04-12 09:29:32 -04:00
Azat Khuzhin
b91281455c clickhouse-client: properly cancel query in case of error during formatting data
One example of such error is NO_ROW_DELIMITER [1]:

    $ clickhouse-client --stacktrace --multiquery <<<"SELECT * FROM no_length_delimiter_protobuf_00825 FORMAT ProtobufSingle SETTINGS format_schema = '$PWD/tests/queries/0_stateless/format_schemas/00825_protobuf_format_no_length_delimiter:Message'"
    Error on processing query: Code: 546. DB::Exception: The ProtobufSingle format can't be used to write multiple rows because this format doesn't have any row delimiter. (NO_ROW_DELIMITER), Stack trace (when copying this message, always include the lines below):

    ...
    3. /build/build_docker/../src/Common/Exception.cpp:56: DB::Exception::Exception()
    4. /build/build_docker/../src/Processors/Formats/Impl/ProtobufRowOutputFormat.cpp:43: DB::ProtobufRowOutputFormat::write()
    5. /build/build_docker/../src/Processors/Formats/IRowOutputFormat.cpp:34: DB::IRowOutputFormat::consume()
    6. /build/build_docker/../src/Processors/Formats/IOutputFormat.cpp:115: DB::IOutputFormat::write()
    7. /build/build_docker/../src/Client/ClientBase.cpp:398: DB::ClientBase::onData()

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/35865/b862fa7f3ede7d30b7c606c06e7fe1e273b49d32/stateless_tests__thread__actions__[3/3].html

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-12 15:22:16 +03:00
Alexander Tokmakov
457a9e9691 fixes for ReplicatedMergeTree 2022-04-12 14:14:26 +02:00
alesapin
1b7b6af268
Merge pull request #36157 from bigo-sg/fixut_coo
Fix UT error sometimes
2022-04-12 14:12:24 +02:00
jewisliu
b2c10611d1 support UNSIGNED modifier with unused parameters of INT 2022-04-12 19:49:57 +08:00
tavplubix
2e95e0db3b
Merge pull request #36133 from Algunenano/osx_atomic_exchange
Add support for atomic exchange in OSX
2022-04-12 14:10:36 +03:00
Kseniia Sumarokova
abb498c9a5
Update ClientBase.cpp 2022-04-12 12:51:19 +02:00
Kseniia Sumarokova
50b5684d00
Update FileSegment.cpp 2022-04-12 11:59:58 +02:00
Alexander Tokmakov
6e4787560b fix another issue 2022-04-12 11:44:25 +02:00
Vladimir C
8873d7b0e7
Merge pull request #36082 from bigo-sg/cache_hive_files 2022-04-12 11:42:08 +02:00
Kseniia Sumarokova
b29202ac88
Merge pull request #36150 from kssenii/fix-cache-test
Fix test 02241_remote_filesystem_cache_on_insert for database Ordinary
2022-04-12 11:08:44 +02:00
Kseniia Sumarokova
74515a3523
Merge pull request #36057 from azat/client-cancel
clickhouse-client: fix query cancellation if any result was not received yet
2022-04-12 09:40:20 +02:00
Kseniia Sumarokova
a77a228ab8
Update FileSegment.cpp 2022-04-12 09:37:03 +02:00
zhanglistar
0ae820550d fix ut error sometimes 2022-04-12 14:30:53 +08:00
bharatnc
e5494de63c h3Res0Indexes - remove unused array 2022-04-11 22:18:55 -07:00
taiyang-li
9d31c44d39 fix bug of read buffer from hdfs 2022-04-12 12:01:51 +08:00
yuuch
588b582437 detail about the input 2022-04-12 11:01:20 +08:00
Yakov Olkhovskiy
dc314d53b3 do not create view before check, use MatchColumnsMode::Name mode 2022-04-11 20:28:11 -04:00
mergify[bot]
46b9a1ef80
Merge branch 'master' into client-trailing-space 2022-04-11 22:07:37 +00:00
Yakov Olkhovskiy
783dbb2e63
Merge branch 'master' into dev_materialized_view 2022-04-11 17:47:35 -04:00
mergify[bot]
8910869987
Merge branch 'master' into thread-pool-reset-thread-name 2022-04-11 21:19:05 +00:00
Kseniia Sumarokova
51dd39b42f
Update StorageSystemRemoteDataPaths.cpp 2022-04-11 22:46:51 +02:00
kssenii
fc62e95d76 Fix 2022-04-11 22:24:45 +02:00
kssenii
d2ccf876c6 Fix 2022-04-11 17:51:49 +02:00
Yakov Olkhovskiy
155a2a0d42
Merge pull request #35349 from yakov-olkhovskiy/interpolate-feature
Interpolate feature
2022-04-11 11:15:50 -04:00
Yakov Olkhovskiy
2588f8011f comment fix 2022-04-11 11:13:29 -04:00
Anton Popov
471e945efe
Merge pull request #35934 from ClickHouse/make_date
Implementation of makeDateTime() and makeDateTime64() #30895
2022-04-11 16:38:23 +02:00
Alexander Tokmakov
38c80940fd slightly beter fix 2022-04-11 16:25:59 +02:00
Kruglov Pavel
972357ebf6
Merge pull request #35748 from bigo-sg/s3_cluster_join
Fixed : elimate AMBIGUOUS_COLUMN_NAME exception in hdfs/s3 cluster join query
2022-04-11 16:22:53 +02:00
Yakov Olkhovskiy
7293e01647 some comments added 2022-04-11 09:47:27 -04:00
mergify[bot]
c117aa13c7
Merge branch 'master' into support_MySQL_style_FORMAT_Vertical_before_semicolon 2022-04-11 13:39:19 +00:00
Nikolai Kochetov
ac74757f92
Merge pull request #35973 from filimonov/kafka_read_consumers_in_parallel
Make parallel reading from several kafka consumers work again
2022-04-11 15:30:52 +02:00
Raúl Marín
83c814f658 OSX fixes 2022-04-11 15:25:20 +02:00
yuuch
36e2809fd7 support '\G;' at the end of query 2022-04-11 20:46:52 +08:00
Raúl Marín
6e346a7fc3 Support atomic replace under OSX 2022-04-11 14:32:55 +02:00
Vitaly Baranov
0ae63dfdbd
Fix code style in registerBackupEnginesFileAndDisk.cpp 2022-04-11 12:45:16 +02:00
alesapin
5357cad105
Merge pull request #36106 from ClickHouse/get_rid_of_fs_paths_keeper
Get rid of fs paths keeper
2022-04-11 12:24:46 +02:00
Vladimir C
1a604cd279
Merge pull request #36058 from xiedeyantu/master 2022-04-11 10:45:50 +02:00
Kseniia Sumarokova
beea4b103f
Merge pull request #36109 from ucasfl/window-view-fix
Fix window view when is proc time and window kind larger than day
2022-04-11 09:54:14 +02:00
Alexander Tokmakov
802f62a80e fix 2022-04-11 09:42:00 +02:00
mergify[bot]
aa8cefa847
Merge branch 'master' into client-cancel 2022-04-11 07:41:44 +00:00
taiyang-li
090fd72884 fix bug 2022-04-11 11:19:31 +08:00
Alexey Milovidov
f0fad98a73 Reset thread name in thread pool 2022-04-11 01:03:24 +02:00
Denny Crane
383076ca0e
fix typo 2022-04-10 16:42:43 -03:00
fenglv
cac2df914b fix 2022-04-10 17:28:17 +00:00
fenglv
24e86f81cb Fix window view when is proc time and window kind larger than day
fix
2022-04-10 17:26:09 +00:00
Vitaly Baranov
8dcb1358b7
Merge pull request #36072 from vitlibar/backups-improve-arguments-handling-and-file-removing
Backups: improve arguments handling and file removing
2022-04-10 16:51:04 +02:00
alesapin
324020a46f Restore class 2022-04-10 15:59:43 +02:00
alesapin
f61cad144c Get rid of strange abstraction 2022-04-10 15:55:05 +02:00
jewisliu
3521292fad Auto assign numbers for Enum elements 2022-04-10 11:57:25 +08:00
Kseniia Sumarokova
867b85dfad
Merge branch 'master' into change-hashed-path 2022-04-09 16:57:57 +02:00
alesapin
2c2b288b44
Merge pull request #36070 from ClickHouse/remove_unused_field
Less dependencies from disks in buffers
2022-04-09 15:01:11 +02:00
xiedeyantu
5efd8a4ec0 If data type has DEFAULT NULL in table definition, make data type Nullable 2022-04-09 15:00:41 +08:00
taiyang-li
7e89f760f3 remove useless code 2022-04-09 10:43:58 +08:00
Vitaly Baranov
758f8235c2 Collect backup entries before opening an archive for writing. 2022-04-09 01:44:46 +02:00
Vitaly Baranov
bcd727d535 Allow creating directories containing a new archive. 2022-04-09 01:32:17 +02:00
Vitaly Baranov
fcd28fc3f4 Make backup metadata clearer with new setting 'use_base'. 2022-04-09 01:07:14 +02:00
tavplubix
2894672ecc
Update DatabaseReplicatedWorker.cpp 2022-04-08 22:12:57 +03:00
tavplubix
faae540a85
Merge pull request #24258 from ClickHouse/mvcc_prototype
MVCC prototype for MergeTree
2022-04-08 22:02:13 +03:00
Kseniia Sumarokova
1e54c5c57b
Merge pull request #35885 from kssenii/fix-postgres-test-2
fix postgres test
2022-04-08 19:55:05 +02:00
Vitaly Baranov
71d54db215 Better handling arguments of backup engines. 2022-04-08 19:52:52 +02:00
taiyang-li
70f4503ba5 use global context for cache 2022-04-09 00:28:07 +08:00
taiyang-li
cd807da838 finish test 2022-04-09 00:15:33 +08:00
taiyang-li
e319df1799 finish dev 2022-04-08 23:58:56 +08:00
Kseniia Sumarokova
10d609fd0d
Update WriteBufferFromS3.cpp 2022-04-08 17:42:05 +02:00
kssenii
138588be29 Change hashed path 2022-04-08 17:14:13 +02:00
Alexander Tokmakov
50a32a74b7 add thread_id and query_id to zookeeper_log 2022-04-08 17:10:08 +02:00
taiyang-li
2c99ef0ecc refactor HiveTableMetadata 2022-04-08 23:04:24 +08:00
Yakov Olkhovskiy
87c2b3e2cf fixed Nullable, tests added 2022-04-08 10:52:10 -04:00
alesapin
4a03402da5
Update ReadBufferFromRemoteFSGather.h 2022-04-08 16:41:37 +02:00
alesapin
60e36abfe9 Get rid of metadata in buffers 2022-04-08 16:03:00 +02:00
Nikolai Kochetov
2deec53162 Disable LIMIT push down through WINDOW functions. 2022-04-08 13:39:54 +00:00
alesapin
ad9fdc1d79 Don't use metadata path in write buffers 2022-04-08 15:30:46 +02:00
alesapin
0db8808f2e Remove unused field from buffers 2022-04-08 15:06:43 +02:00
Vitaly Baranov
46457c4d0c Improve removing of backup files after error. 2022-04-08 14:25:40 +02:00
Kruglov Pavel
d7b88d7683
Merge pull request #35582 from Avogar/improve-schema-inference
Improve schema inference and add some fixes
2022-04-08 13:44:52 +02:00
Alexander Tokmakov
141fbc6980 Merge branch 'master' into mvcc_prototype 2022-04-08 13:38:11 +02:00
Alexander Tokmakov
49c35f3261 Merge branch 'master' into mvcc_prototype 2022-04-08 13:34:40 +02:00
Anton Popov
a16ac67c0c
Merge pull request #36034 from amosbird/better-projection2
Use storage_snapshot for projection analysis
2022-04-08 13:22:53 +02:00
alesapin
becd4eda34
Merge pull request #36047 from ClickHouse/fix-typo
Fix typo
2022-04-08 12:38:24 +02:00
Vitaly Baranov
45dea9933b
Merge pull request #35883 from azat/format-settings
Do not allow SETTINGS after FORMAT for INSERT queries
2022-04-08 12:38:14 +02:00
kssenii
87855c4ae7 Merge master 2022-04-08 12:32:48 +02:00
kssenii
ef2b238444 Fix 2022-04-08 12:30:24 +02:00
alesapin
8ec802bc62
Merge pull request #35475 from kssenii/remote-fs-cache-improvements
Allow to write remote fs cache on all write operations. Add `system.remote_filesystem_cache` table. Add `drop remote filesystem cache (<path>)` query. Add `system.remote_data_paths` table.
2022-04-08 12:06:26 +02:00
Vladimir C
265fa90689
Merge pull request #36033 from vdimir/cross-join-empty-list 2022-04-08 11:59:21 +02:00
Azat Khuzhin
213b7bb222 clickhouse-client: fix query cancellation if any result was not received yet
This should fix issues with queries left after tests like in:
- https://s3.amazonaws.com/clickhouse-test-reports/35865/10b9f38d8215cb57783125efe51a8c7aa48590a5/stateless_tests__debug__actions__[2/3].html
- https://s3.amazonaws.com/clickhouse-test-reports/35865/10b9f38d8215cb57783125efe51a8c7aa48590a5/stateless_tests__debug__actions__[3/3].html

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-08 12:57:38 +03:00
taiyang-li
2e6f0db825 first commit 2022-04-08 15:12:24 +08:00
Azat Khuzhin
44bf8ba568 Remove trailing whitespace in default client_name
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-08 08:09:47 +03:00
taiyang-li
dc4c638af8 Merge branch 'master' into optimize_trivial_hive_query 2022-04-08 11:36:55 +08:00
lgbo-ustc
759e4a9a05 Merge remote-tracking branch 'ck/master' into s3_cluster_join 2022-04-08 09:25:30 +08:00
helifu
1196dc3dbd Don't materialize external tables if it's explain statement
The explain statement of GLOBAL JOIN two distributed tables can speed up 100x:
  explain plan select ... from t1_dist global join t2_dist on ...
  explain pipeline select ... from t1_dist global join t2_dist on ...
2022-04-08 09:00:55 +08:00
kssenii
0b7af1f26c Fix checks 2022-04-08 01:58:55 +02:00
Yakov Olkhovskiy
64dcddc6e3 fixed ASTInterpolateElement::clone, fixed QueryNormalizer to exclude ASTInterpolateElement::children 2022-04-07 17:41:05 -04:00
Alexander Tokmakov
6a46da93ae Merge branch 'master' into mvcc_prototype 2022-04-07 23:22:19 +02:00
Alexey Milovidov
88134c86a5 Fix typo 2022-04-07 20:32:47 +02:00
kssenii
5dce2f18b5 Better 2022-04-07 18:48:35 +02:00
Alexander Tokmakov
2e2e2b9190 fix a race condition 2022-04-07 18:17:43 +02:00
Alexey Milovidov
ffb40c4ff4
Merge pull request #35867 from azat/client-format-error-fix
Properly cancel the query after client format error
2022-04-07 17:42:16 +02:00
Kseniia Sumarokova
5f9bc1c68e
Merge pull request #35987 from awakeljw/fork_chmaster
[Improvement] improvement in PARTITION ALL
2022-04-07 17:36:35 +02:00
mergify[bot]
f84dfe5073
Merge branch 'master' into client-format-error-fix 2022-04-07 14:15:44 +00:00
Azat Khuzhin
33d99c8ffb Introduce compatiblity mode for SETTINGS after FORMAT
Add allow_settings_after_format_in_insert setting, OFF by default.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
v2: s/parser_settings_after_format_compact/allow_settings_after_format_in_insert/ (suggested by vitlibar)
v3: replace ParserSettings with a flag (requested by vitlibar)
2022-04-07 16:36:34 +03:00
Azat Khuzhin
c5ffbc688e Do not allow SETTINGS after FORMAT for INSERT queries
Parsing SETTINGS after FORMAT, that has been introduced in [1], can
interpret SETTING as some values, which is misleading.

  [1]: https://github.com/ClickHouse/ClickHouse/pull/4174/files#diff-ba7bd0657630b1cd94cf6ed364bd857338096f49f66dc82918438d6745753775R106

Note, that we are touching only INSERT queries, not SELECT, since this
is a backward incompatible change, and in case of modifying SELECT it
can break too much.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Fixes: #35100
Fixes: #20343
2022-04-07 16:29:36 +03:00
Alexander Tokmakov
7f54e7b422 Merge branch 'master' into mvcc_prototype 2022-04-07 15:14:06 +02:00
taiyang-li
87507ec9e8 fix conflicts 2022-04-07 20:52:54 +08:00
taiyang-li
d7c79c3a54 merge master and solve conflicts 2022-04-07 20:48:16 +08:00
taiyang-li
e9de38c52b fix bug 2022-04-07 20:45:07 +08:00
avogar
1c783ed88a Resolve conflicts 2022-04-07 12:17:48 +00:00
Kruglov Pavel
73adbb4c15
Merge pull request #35986 from amosbird/better-scalar1
Fix performance regression of scalar query
2022-04-07 14:07:59 +02:00
Amos Bird
a071bde59e
Use storage_snapshot for projection analysis 2022-04-07 19:56:31 +08:00
Alexander Tokmakov
8290ffa88d Merge branch 'master' into mvcc_prototype 2022-04-07 13:50:42 +02:00
avogar
d2017a63b1 Merge branch 'master' of github.com:ClickHouse/ClickHouse into improve-schema-inference 2022-04-07 11:36:40 +00:00
vdimir
eb7ac4c3a6
Handle empty expression list in cross join 2022-04-07 11:32:32 +00:00
Kruglov Pavel
f3f8f27db5
Merge pull request #35735 from Avogar/allow-read-bools-as-numbers
Allow to infer and parse bools as numbers in JSON input formats
2022-04-07 13:20:49 +02:00
vdimir
69160fa3e3
remove dead code in needRewrite function 2022-04-07 10:46:39 +00:00
Nikolai Kochetov
a998d73ee2
Update StorageKafka.cpp 2022-04-07 12:37:11 +02:00
Alexander Gololobov
42d4a84a6f More tests for corner cases 2022-04-07 12:34:26 +02:00
Kseniia Sumarokova
5909b3c04d
Merge pull request #36015 from ucasfl/filelog-fix
Fix data race in StorgeFileLog
2022-04-07 12:23:12 +02:00
Kseniia Sumarokova
18a594a22e
Merge pull request #34631 from bigo-sg/use_minmax_index
Use minmax index for orc/parquet file in Hive Engine
2022-04-07 12:22:19 +02:00
tavplubix
6e9c028bbb
Merge pull request #35956 from Algunenano/limit_dns_retries
DNS cache: Add option to drop elements after several consecutive failures
2022-04-07 13:20:36 +03:00
Nikolai Kochetov
3e1b3f14c0
Merge pull request #34355 from azat/processors-profiling
Profiling on Processors level
2022-04-07 12:13:14 +02:00
alesapin
d21ed546a4
Merge pull request #35967 from ClickHouse/keeper-polishing
Small code changes in ZooKeeper client/Keeper code
2022-04-07 12:11:10 +02:00
Amos Bird
1238babb6f
Make SelectQueryInfo pseudo-copyable 2022-04-07 17:46:50 +08:00
Amos Bird
69022850b9
Better 2022-04-07 17:46:50 +08:00
Amos Bird
9cf5935604
Fix broken SET reuse during projection analysis. 2022-04-07 17:46:49 +08:00
jewisliu
77edd41b2e [Improvement] improvement in PARTITION ALL
1. ASTPartition::formatImpl should output ALL while executing ALTER TABLE t DETACH PARTITION ALL
2. prohibit PARTITION ALL excepte DETACH PARTITION ALL
2022-04-07 17:37:01 +08:00
Kseniia Sumarokova
99a55a2304
Merge pull request #35995 from vdimir/rename_join_ordinary_to_atomic
Create parent directories in DiskLocal::replaceFile
2022-04-07 10:23:40 +02:00
taiyang-li
2dc420c66b rename some symbols in hivefile 2022-04-07 15:48:42 +08:00
taiyang-li
4763a39802 merge bigo-sg/use_minmax_index and solve conflict 2022-04-07 15:45:28 +08:00
taiyang-li
046a2ba51c rename some symboles 2022-04-07 15:35:08 +08:00
taiyang-li
ad074fee91 merge use_minmax_index and solve conflict 2022-04-07 15:19:45 +08:00
taiyang-li
f02d769343 fix build error 2022-04-07 14:29:35 +08:00
Yakov Olkhovskiy
7dbe8bc2dc major bugs fixed, tests added, docs updated 2022-04-07 01:21:24 -04:00
taiyang-li
acc7046d54 remove some useless virtual and rename some functions in HiveFile 2022-04-07 11:46:57 +08:00
taiyang-li
df00bd214d merge bigo-sg/use_minmax_index and solve conflict 2022-04-07 11:18:24 +08:00
taiyang-li
2ef316801c Merge branch 'master' into use_minmax_index 2022-04-07 10:53:25 +08:00
fenglv
517c2ae8df Fix data race in StorgeFileLog 2022-04-07 02:20:20 +00:00
Alexander Gololobov
81d150ed43 Implementation of makeDateTime() and makeDateTime64() 2022-04-07 00:30:18 +02:00
mergify[bot]
585cff1e95
Merge branch 'master' into limit_dns_retries 2022-04-06 18:23:17 +00:00
Anton Popov
13cb564d1e
Merge pull request #35716 from kssenii/fix-local-logs-level
Fix send_logs_level for clickhouse local
2022-04-06 18:52:47 +02:00
tavplubix
58db8cd9b3
Merge pull request #35946 from ClickHouse/faster_replicated_ddl
Make some replicated DDL queries faster
2022-04-06 19:25:25 +03:00
Kseniia Sumarokova
2aa3d32887
Merge pull request #35980 from ucasfl/thread_num
parallel reading files for FileLog Engine
2022-04-06 15:05:41 +02:00
Kruglov Pavel
ec2213493f
Merge branch 'master' into allow-read-bools-as-numbers 2022-04-06 14:53:02 +02:00
Antonio Andelic
cda8a18fe3
Merge pull request #35984 from ClickHouse/fix-url-data-race
Fix data race in StorageURL
2022-04-06 14:36:19 +02:00
kssenii
846faa51d8 Fix bug 2022-04-06 14:35:19 +02:00
Yakov Olkhovskiy
c73115ffb4
Merge pull request #35840 from zzsmdfj/issue/#34966_fix_dateTime_deserialize
to #34966_fix_dateTime_deserialize
2022-04-06 08:10:23 -04:00
Alexander Tokmakov
1309e781b6 apply suggestion 2022-04-06 13:56:26 +02:00
Kruglov Pavel
9141066de3
Merge branch 'master' into improve-schema-inference 2022-04-06 13:51:07 +02:00
vdimir
4cb7b7e49b
Create parent directories in DiskLocal::replaceFile 2022-04-06 11:15:37 +00:00
taiyang-li
0b0c8ef09e add integration tests 2022-04-06 18:47:34 +08:00
Kseniia Sumarokova
d3763c4a62 Update ClientBase.h 2022-04-06 12:13:34 +02:00
Kseniia Sumarokova
a383d9ee6a
Merge pull request #35916 from filimonov/kafka_metrics
Add some metrics to engine Kafka
2022-04-06 11:58:17 +02:00
Kseniia Sumarokova
bb26903675
Merge pull request #35771 from bigo-sg/fix-filebuffer-pos
fix filebuffer pos in RemoteReadBuffer
2022-04-06 11:57:05 +02:00
Amos Bird
df06f9f974
Fix performance regression of scalar query 2022-04-06 17:50:22 +08:00
Vladimir C
2ebae2d722
Merge pull request #35682 from CurtizJ/dynamic-columns-6 2022-04-06 11:48:07 +02:00
Raúl Marín
060f5118f0 Improvements based on PR review 2022-04-06 10:48:12 +02:00
taiyang-li
acb9f1632e suppoort skip splits in orc and parquet 2022-04-06 16:40:22 +08:00
Kseniia Sumarokova
0e1637dfaf
Merge pull request #35354 from kssenii/enable-testmode-by-default
Remove testmode option, enable it unconditionally
2022-04-06 10:06:08 +02:00
Antonio Andelic
bf1f34ddb3 Fix unit tests 2022-04-06 07:43:48 +00:00
Antonio Andelic
84eef61d17 Pull under reader mutex 2022-04-06 06:39:56 +00:00
fenglv
a2ce366c34 parallel reading files for FileLog Engine 2022-04-06 04:49:43 +00:00
Yakov Olkhovskiy
ac441b9dcf compiler suggestions 2022-04-06 00:05:06 -04:00
taiyang-li
43e8af697a fix code style 2022-04-06 11:41:16 +08:00
kssenii
d59d4eda4f Fix tests 2022-04-06 01:58:16 +02:00
Yakov Olkhovskiy
ea9ce3ea18 'T' is added as delimiter, tests added 2022-04-05 19:50:16 -04:00
Mikhail Filimonov
f9a4cd12d4
Make parallel reading of kafka consumers work again (issue #35153) 2022-04-05 21:46:56 +02:00
Yakov Olkhovskiy
6b9a349083
Update SortDescription.h
wrong merge fix
2022-04-05 15:02:34 -04:00
Yakov Olkhovskiy
90c4cd3de7
Merge branch 'master' into interpolate-feature 2022-04-05 14:39:07 -04:00
Yakov Olkhovskiy
e0d6033c39 all columns can participate in interpolate expression despite if they are selected or not, some optimization on expressionless INTERPOLATE 2022-04-05 14:26:49 -04:00
Mikhail Filimonov
3412be9d4d
Change KafkaDirectReads to KafkaConsumersInUse 2022-04-05 20:25:05 +02:00
Nikolai Kochetov
def33323a0
Merge pull request #35788 from amosbird/better-projection1
Improve minmax_count_projection
2022-04-05 19:59:45 +02:00
kssenii
cbd7f4acfb Fix 2022-04-05 19:24:10 +02:00
Alexander Tokmakov
37a06eec1a fixes 2022-04-05 17:36:53 +02:00
Raúl Marín
39cc3baf5f Keep the previous exception code 2022-04-05 16:37:53 +02:00
Antonio Andelic
d296eeee2d Small changes for Keeper 2022-04-05 13:56:28 +00:00
kssenii
83488b2d13 Better 2022-04-05 14:48:26 +02:00
Alexander Tokmakov
d9e3e9b69f Merge branch 'master' into faster_replicated_ddl 2022-04-05 14:38:38 +02:00
Alexander Tokmakov
1fe50ad201 Merge branch 'master' into mvcc_prototype 2022-04-05 14:38:02 +02:00
Maksim Kita
c3c284e6e6
Merge pull request #35917 from kitaisreal/executable-user-defined-function-fix
Executable user defined functions prevent executing during analysis
2022-04-05 14:05:52 +02:00
Raúl Marín
8a05cf3927 DNS cache: Add option to drop elements after several consecutive failures 2022-04-05 13:00:27 +02:00
Azat Khuzhin
8ebaf84989 Fix clang-tidy readability-simplify-boolean-expr warning in AlterCommands.cpp
I want to make the code more readable before, but clang-tidy is too
smart...

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-05 13:39:39 +03:00
Nikolai Kochetov
4479b68980
Merge pull request #35623 from nickitat/function_calculation_after_sorting_and_limit
Functions calculation after sorting
2022-04-05 12:09:56 +02:00
alesapin
eaa72ef002
Merge pull request #35904 from ClickHouse/more_logs_on_unsuccessful_part_removal
More logs on unsuccessful part removal
2022-04-05 11:29:08 +02:00
Maksim Kita
6e1d837439 Fixed style check 2022-04-05 11:24:33 +02:00
Alexander Tokmakov
da00beaf7f Merge branch 'master' into mvcc_prototype 2022-04-05 11:14:42 +02:00
Maksim Kita
b160ffd726
Merge pull request #35723 from ClickHouse/array-has-all-sse-avx2-optimizations
Merging #27653
2022-04-05 11:09:14 +02:00
Kseniia Sumarokova
77c7545395
Merge pull request #35922 from kssenii/fix-race-in-cached-buffer
Fix race in cached buffer
2022-04-05 10:55:58 +02:00
Azat Khuzhin
c6f182163a Require mutations for per-table TTL only when it had been changed
Before this patch only per-column TTL did not requires mutation if it
had not been changed, after per-table TTL will also check whether it had
been changed or not.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-05 11:08:35 +03:00
Amos Bird
5bc09550d8
Fix tests 2022-04-05 15:56:39 +08:00
Amos Bird
35a8bb2a9b
add comment 2022-04-05 15:56:38 +08:00
Amos Bird
163664fad7
Improve minmax_count_projection 2022-04-05 15:56:37 +08:00
Vladimir C
54b4049ea5
Merge pull request #35794 from awakeljw/fork_chmaster 2022-04-05 09:44:45 +02:00
Alexander Tokmakov
4e9ec5dc2f make some replicated DDL faster 2022-04-05 00:51:48 +02:00
kssenii
3fd462bc05 Merge master 2022-04-05 00:06:18 +02:00
Alexey Milovidov
9d5c13c71d
Merge pull request #35886 from azat/format-insert-infile-fix
Fix formatting of INSERT INFILE queries (missing quotes)
2022-04-05 00:47:54 +03:00
larryluogit
808d9afd0f
Fix optin.cplusplus.UninitializedObject issue (#35626)
* Fix optin.cplusplus.UninitializedObject issue

* Enable optin.cplusplus.UninitializedObject
2022-04-04 23:47:14 +03:00
Alexey Milovidov
1b562923f9
Merge pull request #35941 from ClickHouse/revert-35184-clang-tidy-issues
Revert "clang-tidy report issues with Medium priority"
2022-04-04 23:42:21 +03:00
alesapin
69fceb7e6d
Merge pull request #35926 from ClickHouse/better_consumers
Better check for kafka_num_consumers
2022-04-04 22:42:05 +02:00
Alexey Milovidov
4d6c030d23
Revert "clang-tidy report issues with Medium priority" 2022-04-04 23:41:42 +03:00
kssenii
79627798c4 Fix race 2022-04-04 20:44:39 +02:00
Mikhail Filimonov
53c7376e37
Add some metrics to engine Kafka 2022-04-04 20:25:53 +02:00
alesapin
d04c48e67a Fix build 2022-04-04 20:14:09 +02:00
alesapin
1e4fe5e3b5
Merge pull request #35882 from ClickHouse/more_metadata_alters
Make more alters of nested types metadata-only
2022-04-04 20:11:31 +02:00
Alexander Gololobov
f0de8eb625 Extracted argument handling into a separate class to reuse it for makeDateTime() and makeDateTime64() 2022-04-04 19:57:04 +02:00
alesapin
0477e74f42 Get rid of caps 2022-04-04 19:41:54 +02:00