Azat Khuzhin
83d68246c3
Fix LOGICAL_ERROR on connection draining in case of ECONNRESET
...
In case of ECONNRESET (Connection reset by peer) the "cancelled" will
not be set, and so drain() will fail with LOGICAL_ERROR:
<details>
2021.10.16 04:10:55.054771 [ 7635 ] {882164e0-ca26-4955-8759-708ba1f6e85c} <Error> PullingAsyncPipelineExecutor: Code: 210. DB::NetException: Connection reset by peer, while writing to socket (127.0.0.2:9000). (NETWORK_ERROR), Stack trace (when copying this message, always include the lines below):
...
4. ./obj-x86_64-linux-gnu/../src/Common/NetException.h:12: DB::NetException::NetException(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x20db5749 in /usr/bin/clickhouse
5. ./obj-x86_64-linux-gnu/../src/IO/WriteBufferFromPocoSocket.cpp:56: DB::WriteBufferFromPocoSocket::nextImpl() @ 0x211d56bb in /usr/bin/clickhouse
6. ./obj-x86_64-linux-gnu/../src/IO/WriteBuffer.h:47: DB::WriteBuffer::next() @ 0x14e4c874 in /usr/bin/clickhouse
7. ./obj-x86_64-linux-gnu/../src/Client/Connection.cpp:560: DB::Connection::sendCancel() @ 0x227c0c22 in /usr/bin/clickhouse
8. ./obj-x86_64-linux-gnu/../src/Client/HedgedConnections.cpp:242: DB::HedgedConnections::sendCancel() @ 0x227f1b53 in /usr/bin/clickhouse
...
2021.10.16 04:12:35.555530 [ 5575 ] {} <Fatal> : Logical error: 'Cannot drain connections: cancel first.'.
</details>
Found by stress tests on CI [1].
[1]: https://clickhouse-test-reports.s3.yandex.net/0/d3cb99701d4aaec384fd183168d10e0f650ecc1d/stress_test_(debug).html#fail1
2021-10-23 22:44:32 +03:00
Kseniia Sumarokova
00d0665bf2
Merge pull request #30477 from kssenii/postgres-fix-query
...
More reliable fetch query in postgres database
2021-10-23 19:07:34 +03:00
Anton Popov
cdfa36a181
Merge pull request #30266 from CurtizJ/aggregation-in-order-4
...
Improve performance of aggregation in order of primary key
2021-10-23 18:09:17 +03:00
Vladimir C
410624749e
Merge pull request #30492 from vdimir/fix-alter-scalar-deadlock
2021-10-23 12:01:00 +03:00
Kseniia Sumarokova
f362d420b8
Update fetchPostgreSQLTableStructure.cpp
2021-10-23 11:38:18 +03:00
kssenii
1fa123ee5c
Properly done
2021-10-23 01:33:17 +03:00
Anton Popov
74cf57b4b0
fix for empty chunks
2021-10-22 21:48:03 +03:00
Anton Popov
7c458fbc4c
fix style check
2021-10-22 18:04:11 +03:00
Filatenkov Artur
1c72421e53
Add columns in columns.sql for INFORMATION_SCHEMA ( #29637 )
...
* add columns in columns.sql for INFORMATION_SCHEMA
2021-10-22 15:18:16 +03:00
Kseniia Sumarokova
5a60d9a3a3
Merge pull request #30521 from azat/local-fix
...
clickhouse-local: fix block lost in interactive mode
2021-10-22 14:49:39 +03:00
Maksim Kita
243be5028a
Merge pull request #30014 from jinjunzh/master
...
add x86 feature avx2/avx512 support for accelerating filter operation
2021-10-22 14:16:47 +03:00
Anton Popov
151daf61c1
Merge pull request #30522 from azat/remove-check_columns
...
Remove check_columns argument from MergeTree code (false was never passed)
2021-10-22 14:06:49 +03:00
Maksim Kita
fc8a515b42
Merge pull request #30431 from vesslanjin/remove-branchy-code-in-ColumnDecimal
...
remove branch in ColumnDecimal, same as pull req #29881
2021-10-22 13:24:44 +03:00
Kseniia Sumarokova
057fe51ec8
Update TableFunctionPostgreSQL.cpp
2021-10-22 13:08:38 +03:00
kssenii
c95a29edac
Fix quoting
2021-10-22 10:07:23 +00:00
vdimir
cfb98d381c
Do not use default scalars in MutationsInterpreter::prepareInterpreterSelectQuery
2021-10-22 12:47:28 +03:00
Nikolai Kochetov
1533f4af57
Merge pull request #30335 from ClickHouse/single-sorting-step
...
Single sorting step
2021-10-22 11:34:29 +03:00
Vladimir C
d60f00bab8
Merge pull request #30520 from azat/fix-unary-postfix-rewrite
2021-10-22 11:31:36 +03:00
Maksim Kita
6561f9bed2
Merge pull request #30483 from kitaisreal/sql-user-defined-functions-composition-fix
...
SQLUserDefinedFunctions composition fix
2021-10-22 10:16:31 +03:00
Azat Khuzhin
b0984a3337
clickhouse-local: fix block lost in interactive mode
...
In case only one block in the query execution, LocalConnection can
return Progress packet instead of the block itself, after it will call
poll() again and the block will got lost.
Fix this by processing block before Progress packet.
And actually AFAICS Progress can be removed after pollImpl(), since
there is Progress handling before.
Fixes : #30282 (cc @kssenii)
2021-10-22 00:46:01 +03:00
Maksim Kita
adaa14f8aa
Merge pull request #30502 from kitaisreal/storage-dictionary-fix-potential-configuration-race
...
StorageDictionary fix potential configuration race
2021-10-22 00:14:11 +03:00
Azat Khuzhin
496aa43a9f
Remove check_columns argument from MergeTree code (false was never passed)
2021-10-21 21:24:59 +03:00
Azat Khuzhin
e1b6acfa52
Add missing parenthesis for isNotNull/isNull rewrites to IS [NOT] NULL
...
After #29446 the following query was "broken":
select isNotNull(1)+isNotNull(2) from remote('127.2', system.one)
This was also a problem for queries to external storages (i.e. mysql),
since it also uses query rewrite, like non-local distributed queries.
Fixes : #29446
2021-10-21 21:18:00 +03:00
Vitaly Baranov
5695ef55b3
Merge pull request #28125 from vitlibar/fix-writing-storage-log-marks
...
Fix writing marks in StorageLog
2021-10-21 20:10:01 +03:00
Maksim Kita
4ea969350b
Fixed build
2021-10-21 18:43:33 +03:00
vdimir
039af96b61
Set execute_scalar_subqueries in MutationsInterpreter only for MergeTree and prepareInterpreterSelectQuery
2021-10-21 18:05:46 +03:00
Dmitry Novik
58ee783be4
Merge pull request #30293 from amosbird/projection-fix19
...
Fix projections with JOIN alias columns
2021-10-21 17:49:21 +03:00
Maksim Kita
8885748a6c
StorageDictionary fix potential configuration race
2021-10-21 17:25:53 +03:00
Anton Popov
b1a74af44d
Merge pull request #30180 from CurtizJ/remove-sample-by
...
Allow to remove `SAMPLE BY` expression
2021-10-21 17:09:53 +03:00
tavplubix
4c5104b30d
Merge pull request #30432 from ClickHouse/tavplubix-patch-3
...
Fix segfault on REPLACE PARTITION if session expired
2021-10-21 17:08:57 +03:00
vdimir
ed0bb2cec2
Fix deadlock on ALTER with scalar subquery to the same table
2021-10-21 14:02:51 +03:00
Kseniia Sumarokova
da0021c82f
Merge pull request #30412 from ClickHouse/kssenii-fix-test
...
Follow-up for #30282
2021-10-21 12:48:10 +03:00
Kruglov Pavel
27e8a83269
Merge pull request #30426 from amosbird/jsonextractstring3
...
JSONExtractString raw string support.
2021-10-21 12:29:11 +03:00
Vladimir C
388c3123f0
Merge pull request #30370 from Enmk/fix_session_log
2021-10-21 11:07:48 +03:00
Maksim Kita
650a79a907
SQLUserDefinedFunctions composition fix
2021-10-21 10:08:08 +03:00
Kseniia Sumarokova
feeb572219
Merge pull request #30474 from kssenii/sql-json-fix
...
sql json change order of arguments
2021-10-21 09:47:12 +03:00
Kseniia Sumarokova
5544e866f8
Merge pull request #30219 from lhuang09287750/master
...
make date32 type comparable with date/datetime/string
2021-10-21 09:38:55 +03:00
kssenii
a223526f45
Fix
2021-10-20 23:29:35 +00:00
kssenii
c96b884951
Fix
2021-10-20 20:47:34 +00:00
alexey-milovidov
d3df1c02bc
Merge pull request #29672 from ClickHouse/clickhouse-obfuscator-2
...
More enhancements for query obfuscator
2021-10-20 23:06:29 +03:00
Maksim Kita
e550e0c22d
Merge pull request #30435 from kitaisreal/sql-user-defined-functions-support-lambdas
...
SQLUserDefinedFunctions support lambdas
2021-10-20 21:36:52 +03:00
Maksim Kita
1b4829d071
Merge pull request #30454 from kitaisreal/sql-user-defined-functions-create-or-replace-no-exists-support
...
SQLUserDefinedFunctions support CREATE OR REPLACE, CREATE IF NOT EXISTS
2021-10-20 21:36:42 +03:00
Kseniia Sumarokova
cae31437e8
Merge pull request #30336 from kssenii/fix-local-defaults
...
Send table columns in clickhouse-local
2021-10-20 21:18:02 +03:00
kssenii
220791b21c
Fix
2021-10-20 17:15:07 +00:00
Nikita Mikhaylov
56869c0ec4
Merge pull request #30360 from nikitamikhaylov/allow-graphite-final
...
Allow to use FINAL clause in SELECT from GraphiteMergeTree
2021-10-20 19:57:44 +03:00
Maksim Kita
ff48017f4a
SQLUserDefinedFunctions support CREATE OR REPLACE, CREATE IF NOT EXISTS
2021-10-20 17:56:46 +03:00
Maksim Kita
73e6110b2a
Merge pull request #30437 from kitaisreal/sql-user-defined-functions-drop-if-exists
...
SQLUserDefinedFunctions added DROP IF EXISTS support
2021-10-20 17:24:57 +03:00
Amos Bird
2f615e9176
Use original_query for projection analysis
2021-10-20 21:30:15 +08:00
Amos Bird
240895fba7
Fix projections with JOIN alias columns
2021-10-20 21:30:15 +08:00
Nikolai Kochetov
8986de7e50
Merge pull request #30384 from amosbird/projection-fix21
...
Fix crash when minmax_count projection is used with primary key in partition expr
2021-10-20 16:17:13 +03:00