Commit Graph

726 Commits

Author SHA1 Message Date
Raúl Marín
ea5c02a605 WIP 2021-07-27 16:26:27 +02:00
Nikolai Kochetov
be121ded20
Update PushingToViewsBlockOutputStream.cpp 2021-07-27 12:25:07 +03:00
Nikolai Kochetov
a9effdad18 Merge branch 'master' into output-streams-to-processors 2021-07-27 11:31:53 +03:00
Nikolai Kochetov
f656b5a161 Another try to fix tests. 2021-07-27 11:29:24 +03:00
Nikolai Kochetov
4ec05e13da Fix fuzz logical error. 2021-07-26 20:34:04 +03:00
Nikolai Kochetov
61d8f880cd Rename some files. 2021-07-26 19:48:25 +03:00
Nikolai Kochetov
9b5a816b43 Merge branch 'master' into output-streams-to-processors 2021-07-26 18:03:11 +03:00
Nikolai Kochetov
0eb563dc1b Fix more tests. 2021-07-26 17:47:29 +03:00
Amos Bird
50e53035c9
Remove unneeded mutex during connection draining 2021-07-26 19:15:45 +08:00
Nikolai Kochetov
fa1c223269 Fix some tests. 2021-07-26 13:08:40 +03:00
alexey-milovidov
d3127d6265
Merge pull request #26731 from vdimir/fix-async-drain-connection-uaf
Fix use after free in AsyncDrain connection from S3Cluster
2021-07-24 18:55:03 +03:00
alexey-milovidov
dab9cfb9c9
Merge pull request #26713 from ClickHouse/remove-more-and--more-streams
Remove more streams.
2021-07-24 02:24:10 +03:00
Nikolai Kochetov
9c92f43359 Update storages. 2021-07-23 22:33:59 +03:00
Nikolai Kochetov
80e0e24448 Fix unit test and style. 2021-07-23 12:29:53 +03:00
vdimir
dccc379d39
Fix use after free in AsyncDrain connection from S3Cluster 2021-07-23 10:40:03 +03:00
Nikolai Kochetov
3c17a62686
Merge pull request #26590 from ClickHouse/remove-some-more-streams
Remove some streams.
2021-07-22 21:28:50 +03:00
Nikolai Kochetov
f56a45155f Merge branch 'master' into remove-more-and--more-streams 2021-07-22 19:10:39 +03:00
Nikolai Kochetov
fd754430eb Remove more streams. 2021-07-22 19:05:52 +03:00
Nikolai Kochetov
5ffd99dfd4
Merge pull request #25674 from amosbird/distributedreturnconnection
Drain connection asynchronously
2021-07-22 11:04:49 +03:00
Nikolai Kochetov
f38de35b14 Rename some constants. 2021-07-21 19:13:17 +03:00
Amos Bird
205edec80d
Use shared_ptr for connections 2021-07-21 19:56:32 +08:00
Azat Khuzhin
7b7e8acf4f Fix excessive connect attempts with skip_unavailable_shards
Before this patch the query was sent from
RemoteBlockInputStream::readPrefix() and also from
RemoteBlockInputStream::read().

And since in case of skip_unavailable_shards=1 connection errors are
ignored, it tries to do x2 connect attempts.

Fix this, but removing RemoteBlockInputStream::readPrefix().

Fixes: #26511
2021-07-21 10:06:54 +03:00
Nikolai Kochetov
179ec05a72 Remove some streams. 2021-07-20 21:18:43 +03:00
Amos Bird
dbfb699690
Asynchronously drain connections. 2021-07-19 21:53:29 +08:00
Kseniia Sumarokova
b0ddc4fb30
Merge pull request #26364 from kssenii/fixing-date32
Continuation of #25774
2021-07-18 21:44:45 +03:00
kssenii
9cb10aae3c Some fixes 2021-07-18 03:43:08 +00:00
alexey-milovidov
70701d2606
Update IBlockInputStream.cpp 2021-07-17 23:16:18 +03:00
Alexey Milovidov
c648e8356b Remove even more code 2021-07-17 21:58:51 +03:00
Alexey Milovidov
261a220227 Remove some code 2021-07-17 21:06:46 +03:00
Anton Popov
c45a9e3bd6 Merge remote-tracking branch 'upstream/master' into HEAD 2021-07-16 17:11:34 +03:00
Nikita Mikhaylov
601d04f55d ignore 2021-07-13 22:16:27 +00:00
Anton Popov
19d0f1bbfc Merge remote-tracking branch 'upstream/master' into HEAD 2021-07-13 16:12:08 +03:00
Ivan Lezhankin
ab26aed6f9 Merge remote-tracking branch 'upstream/master' into async-insert 2021-07-13 13:54:09 +03:00
Kseniia Sumarokova
ec51215a75
Update SQLiteBlockInputStream.cpp 2021-07-12 20:39:47 +03:00
mergify[bot]
b7ae4e4ced
Merge branch 'master' into async-insert 2021-07-12 09:21:37 +00:00
kssenii
068d85aa8b Fix Nulls usage 2021-07-12 07:53:52 +00:00
kssenii
10611ef92a Normal exceptions 2021-07-10 11:00:59 +00:00
kssenii
d250d79e33 Generate ya make 2021-07-10 08:07:55 +00:00
kssenii
78094a82ab Better 2021-07-10 08:05:23 +00:00
kssenii
1bf9a9f29f Add .cmake 2021-07-09 10:27:53 +00:00
kssenii
b7f3d16c5f Fix conversion 2021-07-07 20:39:41 +00:00
kssenii
ff56f1787c Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into g-arslan-add-sqlite-support 2021-07-07 15:19:12 +00:00
alesapin
4c85dae572
Merge pull request #25743 from ClickHouse/fix_aggregation_ttl
Fix bug in execution of TTL GROUP BY
2021-07-07 10:49:16 +03:00
alesapin
75e26b93d0 Review bug fixes 2021-07-06 15:05:58 +03:00
alexey-milovidov
fef7c557f6
Merge pull request #24789 from kitaisreal/compile-aggregation-functions
Compile aggregate functions
2021-07-05 02:57:49 +03:00
Maksim Kita
da8c957167 Aggregator added CompiledExpressionCache 2021-07-01 22:56:36 +03:00
Maksim Kita
d24d3ae992 Added second variant of compilation 2021-07-01 22:56:36 +03:00
Maksim Kita
3fe559b31f Compile aggregate functions 2021-07-01 22:56:35 +03:00
mergify[bot]
1799804243
Merge branch 'master' into fix_aggregation_ttl 2021-06-30 09:15:46 +00:00
kssenii
9d5847a1a8 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-06-29 21:30:31 +00:00
Ivan Lezhankin
5ea90e6961 Restore missing file 2021-06-28 23:04:14 +03:00
Ivan Lezhankin
79a1a6c599 Revert "Filter out some insert-settings"
This reverts commit 14c5eff6dd.
2021-06-28 22:56:38 +03:00
Ivan Lezhankin
1bb41593d1 Merge remote-tracking branch 'upstream/master' into async-insert 2021-06-28 22:55:56 +03:00
Kseniia Sumarokova
9d02af7d8b
Merge pull request #25676 from sand6255/MaterializeMySQL-Support-Enum-Data-Type
MaterializeMySQL: support ENUM data type
2021-06-28 19:15:00 +03:00
alesapin
1b56b0a020 Fix flaky test 2021-06-28 11:10:38 +03:00
alesapin
c977c33d6d Fix bug in execution of TTL GROUP BY 2021-06-27 19:18:15 +03:00
kssenii
3d90f0710c Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-06-26 22:04:47 +00:00
Anton Popov
fa8ad1a7c6 reduce memory usage in queries with 'ORDER BY primary_key' 2021-06-25 19:23:41 +03:00
Storozhuk Kostiantyn
4a3145f586 Materialize my sql support enum data type
* Implemented Enum for MaterializeMySQL
2021-06-25 16:42:25 +08:00
kssenii
fb9c92cb6c Fix 2021-06-21 10:32:40 +00:00
kssenii
c0732ddc12 Fix datetime with timezone 2021-06-21 08:22:12 +00:00
Ivan Lezhankin
14c5eff6dd Filter out some insert-settings 2021-06-17 17:59:28 +03:00
Ivan Lezhankin
37365589ed Merge branch 'master' into async-insert 2021-06-17 16:57:45 +03:00
Maksim Kita
67e9b85951 Merge ext into common 2021-06-16 23:28:41 +03:00
Alexey Milovidov
447d7bb8cd Minor changes 2021-06-14 07:13:35 +03:00
Ivan Lezhankin
791cbcf0b1 Merge remote-tracking branch 'upstream/master' into async-insert 2021-06-02 18:50:37 +03:00
Ivan Lezhankin
84c23dc060 Merge branch 'master' into async-insert 2021-06-02 18:06:21 +03:00
Arslan G
4fe9a24472 Fix review a little, try add simple test 2021-06-02 03:53:30 +03:00
Arslan G
6f7dc47b2b Merge branch 'master' into add-sqlite-support 2021-06-02 00:24:29 +03:00
Arslan G
bf4171e0ea Some review fixes 2021-06-01 23:52:12 +03:00
kssenii
12ea45e956 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-06-01 17:43:34 +00:00
Vxider
3a5b0632c9 Merged with master 2021-06-01 07:39:42 +00:00
Nikolai Kochetov
afc1fe7f3d Make ContextPtr const by default. 2021-05-31 17:49:02 +03:00
Arslan G
fbc5734302 Clean up code and fix tests 2021-05-28 20:00:26 +03:00
Vxider
ac0468d389 Merged with master 2021-05-28 09:14:55 +00:00
Vxider
ad05f4f303 Merged with master 2021-05-28 07:36:19 +00:00
Arslan G
8242cb63ce Fix reading from SQLite 2021-05-24 11:31:38 +03:00
kssenii
a78c9e63e7 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-05-23 12:07:26 +00:00
alexey-milovidov
a25f1910cc
Merge pull request #24320 from ClickHouse/remove-auto-array
Remove AutoArray
2021-05-22 02:19:59 +03:00
Alexey Milovidov
ea30bb7abf Improve implementation 2021-05-21 04:17:18 +03:00
Alexey Milovidov
1006a970f7 Remove AutoArray 2021-05-20 09:30:13 +03:00
Maksim Kita
c50909468f Updated ExpressionActionSettings 2021-05-19 17:32:07 +03:00
Maksim Kita
150a88d647 ExpressionActions compile only necessary places 2021-05-19 11:43:16 +03:00
Arslan G
dde9e30043 Merge branch 'master' into add-sqlite-support 2021-05-17 14:38:24 +03:00
Arslan G
ea51840f85 Init SQLite integration 2021-05-17 14:02:35 +03:00
kssenii
0955e5f0be Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-05-12 15:11:15 +00:00
Nikolai Kochetov
a1ba67e029
Merge pull request #20202 from amosbird/projection
Projections
2021-05-12 09:38:07 +03:00
Nikolai Kochetov
3296c9292f
Try to merge projectons faster. 2021-05-11 18:12:26 +08:00
vdimir
adb5fe2f30
Finalize CompressedWriteBuffer in TemporaryFileStream 2021-05-11 12:23:35 +03:00
kssenii
993823bcc4 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-05-09 21:26:41 +00:00
Alexey Milovidov
903c306e04 Fix some PVS-Studio warnings 2021-05-09 01:10:10 +03:00
Alexey Milovidov
ab9b116310 Fix some PVS-Studio warnings 2021-05-09 01:09:16 +03:00
Alexey Milovidov
ad88819ee4 Fix a bunch of warnings from PVS-Studio 2021-05-08 19:13:10 +03:00
Alexey Milovidov
604daa9581 Fix a bunch of warnings from PVS-Studio 2021-05-08 19:09:17 +03:00
kssenii
5c24f0943c Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-05-08 14:54:44 +00:00
Alexey Milovidov
47a4c101b9 Merge branch 'master' into normalize-bigint 2021-05-08 16:41:15 +03:00
kssenii
912878ad7f Review fixes 2021-05-07 12:05:34 +00:00
kssenii
b96f047db7 Fix clang tidy 2021-05-06 07:02:13 +00:00
kssenii
8900e93bd8 New impl 2021-05-06 00:52:59 +00:00
Alexey Milovidov
6ca37b9512 Untangle UUID 2021-05-04 01:59:38 +03:00
Alexey Milovidov
02ce9cc725 Untangle UUID 2021-05-04 01:46:51 +03:00
Alexey Milovidov
1fda866881 Merge branch 'master' into normalize-bigint 2021-05-02 21:24:45 +03:00
alexey-milovidov
7ca42d2ce1
Merge pull request #23805 from ClickHouse/fix-hedged-requests-ext-tables
Fix sending external table for hedged connections.
2021-05-01 08:13:13 +03:00
kssenii
7643d84095 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-04-30 22:02:51 +00:00
Nikolai Kochetov
0c063755d9 Fix style 2021-04-30 18:21:55 +03:00
Nikolai Kochetov
352ec049ad Fix sending external table for hedged connections. 2021-04-30 17:19:48 +03:00
Maksim Kita
318c4bb80d Add examples folder filter to ya.make.in 2021-04-30 11:25:52 +03:00
Maksim Kita
0d0a14a925 Poco::Timespan reference fix 2021-04-29 19:11:20 +03:00
Nikita Mikhaylov
9f55424250 move to examples everywhere 2021-04-27 01:51:42 +03:00
Nikolai Kochetov
092ff0faeb
Merge pull request #23524 from kssenii/insert-union-select
Allow to insert default instead of Null in insert-select / insert-select-union-all
2021-04-26 12:25:49 +03:00
Alexey Milovidov
649550c5ab Attempt to normalize big integers 2021-04-25 12:30:43 +03:00
kssenii
8f34199538 Fixes 2021-04-23 12:36:40 +00:00
kssenii
54a7a6ef0d Allow null to default convertion only if column has default 2021-04-23 09:55:57 +00:00
Ivan Lezhankin
d9626e73c3 Revert "CC"
This reverts commit ee194928d2.
2021-04-22 16:55:18 +03:00
Anton Popov
3548e31afd fix corner cases in vertical merges with ReplacingMergeTree 2021-04-22 01:27:18 +03:00
Ivan Lezhankin
ee194928d2 CC 2021-04-21 16:19:28 +03:00
Ivan Lezhankin
7a88ca31cc Merge branch 'master' into async-insert 2021-04-19 18:33:43 +03:00
Ivan Lezhankin
6ed9e34750 [WIP] 2021-04-19 17:51:26 +03:00
kssenii
88b50621d4 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-04-18 14:40:37 +00:00
Ivan Lezhankin
7f43dddf0b CC 2021-04-16 20:49:38 +03:00
ruct
303813c1d8 Maybe 2021-04-16 16:07:56 +03:00
ruct
adbd2d65c2 Try 2021-04-16 16:07:56 +03:00
Azat Khuzhin
6b9534cad8 Add copyData() with std::atomic and progress callback 2021-04-14 23:15:31 +03:00
Azat Khuzhin
3a2e8fea68 Change logging levels for PushingToViewsBlockOutputStream
Use different logging levels for overall push and push per view.
2021-04-14 23:15:31 +03:00
Ivan Lezhankin
9e5d274467 Merge remote-tracking branch 'upstream/master' into async-insert 2021-04-14 20:16:05 +03:00
Maksim Kita
470b0db8a2
Merge pull request #23049 from ClickHouse/remove-useless-code-6
Remove useless files
2021-04-14 13:27:54 +03:00
Alexey Milovidov
07b610cf70 Remove useless files 2021-04-13 23:04:13 +03:00
Nikita Mikhaylov
024374a2ec review fixes 2021-04-13 22:39:43 +03:00
Nikita Mikhaylov
7a68820342 style 2021-04-13 22:39:42 +03:00
Nikita Mikhaylov
c333c3dedb review fixes 2021-04-13 22:39:42 +03:00
Nikita Mikhaylov
efef179b89 remove prints 2021-04-13 22:39:42 +03:00
Nikita Mikhaylov
36a8419f60 style 2021-04-13 22:39:42 +03:00
Nikita Mikhaylov
8a4b5a586e fixed uuid 2021-04-13 22:39:42 +03:00
Nikita Mikhaylov
7276b40556 better 2021-04-13 22:39:42 +03:00
Nikita Mikhaylov
4843f86329 use only one connection between initiator and worker 2021-04-13 22:39:42 +03:00
Nikita Mikhaylov
a5d55781b1 remote debug prints 2021-04-13 22:39:41 +03:00
Nikita Mikhaylov
4e4b383214 added hash of itiator address 2021-04-13 22:39:41 +03:00
Nikita Mikhaylov
2549468c14 better 2021-04-13 22:39:41 +03:00
kssenii
01075677cf Better 2021-04-11 20:22:33 +00:00
kssenii
c1adece94f Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-04-11 06:00:18 +00:00
Ivan
495c6e03aa
Replace all Context references with std::weak_ptr (#22297)
* Replace all Context references with std::weak_ptr

* Fix shared context captured by value

* Fix build

* Fix Context with named sessions

* Fix copy context

* Fix gcc build

* Merge with master and fix build

* Fix gcc-9 build
2021-04-11 02:33:54 +03:00
kssenii
f7361250b2 Fixes 2021-04-09 11:02:12 +00:00
kssenii
4482a35a3a Check table in a suggested way 2021-04-08 20:39:16 +00:00
kssenii
b544c9fe9a Add default template 2021-04-08 13:08:51 +00:00
kssenii
8586565ce9 Move connection-related filed to Core/PostgreSQL 2021-04-08 12:43:02 +00:00
kssenii
9fa21a6272 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-04-08 12:18:54 +00:00
Kseniia Sumarokova
ad85467128
Merge pull request #22668 from kssenii/postgres-add-bool
Add bool type in postgres engine
2021-04-06 13:29:33 +03:00
kssenii
cc2fdc6c62 Add bool type 2021-04-05 14:49:52 +00:00
kssenii
99f0b08ac3 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into replicas-shards-for-mysql-and-postgres 2021-04-01 13:48:33 +00:00
Alexey Milovidov
b0539eb28f Move method 2021-04-01 06:28:25 +03:00
kssenii
ce05087b1b Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into replicas-shards-for-mysql-and-postgres 2021-03-30 17:27:10 +00:00
Ivan Lezhankin
de05803177 Merge branch 'master' into async-insert 2021-03-29 20:59:02 +03:00
Anton Popov
ea82e7725f
Merge pull request #21562 from CurtizJ/serialization-refactoring-4
Refactoring of data types serialization
2021-03-29 16:36:44 +03:00
kssenii
22b515fbc9 Add namespace, simplify names 2021-03-27 20:14:02 +00:00
Azat Khuzhin
82c79fe4ce Fix query cancellation with use_hedged_requests=0 and async_socket_for_remote=1
In #21643 async_socket_for_remote=1 was fixed to avoid leaving the
connection in the unsynchronised state.

But one should not try to wait for the current packet in case of timeout
because this will exceed the timeout.

Anyway if the timeout is exceeded, then the connection will be shutdown
(disconnected), so it will not left in an unsynchronised state.
2021-03-26 21:24:42 +03:00
Anton Popov
6a15431be7 Merge remote-tracking branch 'upstream/master' into HEAD 2021-03-25 15:57:35 +03:00
Alexander Kuzmenkov
2f5dbf57b6
Merge pull request #21839 from kssenii/add-postgres-connection-pool
Add connection pool for postgres engine
2021-03-22 19:49:51 +03:00
kssenii
caffccd73e Fixes 2021-03-20 11:53:41 +00:00
kssenii
619f0f51fd Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-03-20 09:47:05 +00:00
Ivan Lezhankin
4f1fad97ab Merge remote-tracking branch 'upstream/master' into async-insert 2021-03-19 23:41:01 +03:00
kssenii
9057aad798 Better version 2021-03-19 08:11:36 +00:00
kssenii
f1ef87d966 Fix 2021-03-18 20:04:54 +00:00
Nikolai Kochetov
c3c393a7aa Merge branch 'master' into refactor-actions-dag 2021-03-18 14:33:07 +03:00
kssenii
3903d59d30 Better 2021-03-17 14:34:04 +00:00
kssenii
ae64a24844 Add connection pool 2021-03-17 13:55:47 +00:00
kssenii
e722cee375 Better templates 2021-03-17 10:52:56 +00:00
alexey-milovidov
d02726bcac
Merge pull request #9404 from Enmk/DateTime64_extended_range
Date time64 extended range
2021-03-17 11:06:03 +03:00
kssenii
a03e849a8f Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-03-16 10:06:10 +00:00
Alexey Milovidov
3f67f4f47b Saturation for DateTime 2021-03-15 23:40:33 +03:00
Alexey Milovidov
671395e8c8 Most likely improve performance 2021-03-15 22:23:27 +03:00
Anton Popov
81ac6382a3 slightly better performance 2021-03-13 21:05:18 +03:00
Azat Khuzhin
65f90f2ce9 Fix distributed requests cancellation with async_socket_for_remote=1
Before this patch for distributed queries, that requires cancellation
(simple select from multiple shards with limit, i.e. `select * from
remote('127.{2,3}', system.numbers) limit 100`) it is very easy to
trigger the situation when remote shard is in the middle of sending Data
block while the initiator already send Cancel and expecting some new
packet, but it will receive not new packet, but part of the Data block
that was in the middle of sending before cancellation, and this will
lead to some various errors, like:
- Unknown packet X from server Y
- Unexpected packet from server Y
- and a lot more...

Fix this, by correctly waiting for the pending packet before
cancellation.

It is not very easy to write a test, since localhost is too fast.

Also note, that it is not possible to get these errors with hedged
requests (use_hedged_requests=1) since handle fibers correctly.

But it had been disabled by default for 21.3 in #21534, while
async_socket_for_remote is enabled by default.
2021-03-11 21:55:21 +03:00
Anton Popov
bc417cf54a refactoring of serializations 2021-03-09 17:46:52 +03:00
Nikolai Kochetov
a669f7d641 Merge branch 'master' into refactor-actions-dag 2021-03-05 18:21:14 +03:00
Nikolai Kochetov
9a39459888 Refactor ActionsDAG 2021-03-04 20:38:12 +03:00
Ivan Lezhankin
74214865eb Merge remote-tracking branch 'upstream/master' into async-insert 2021-03-04 14:14:28 +03:00
Ivan Lezhankin
b726845be2 [WIP] 2021-03-04 14:10:21 +03:00
Alexey Milovidov
4e8239e098 Merge branch 'master' into DateTime64_extended_range 2021-03-03 23:43:20 +03:00
Nikolai Kochetov
4775ea305e Remove index by name from ActionsDAG 2021-03-02 20:51:54 +03:00
Pavel Kruglov
153bfbfc28 Merge branch 'master' of github.com:ClickHouse/ClickHouse into hedged-requests 2021-03-02 11:59:32 +03:00
kssenii
a3c7402200 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-03-02 07:07:56 +00:00
Maksim Kita
315824978d CheckConstraintsBlockOutputStream optimize nullable column case 2021-02-27 19:19:21 +03:00
Ivan Lezhankin
c9dc07fddd Another fix 2021-02-26 20:37:34 +03:00
Ivan Lezhankin
dcf907649b Fix test 2021-02-26 18:47:57 +03:00
Maksim Kita
da321c2bfe Fixed check for null value in null map 2021-02-25 16:08:04 +03:00
Maksim Kita
23af53067d Updated support for Nullable column 2021-02-25 14:27:46 +03:00
Maksim Kita
2eec1d021b Fixed unused code 2021-02-25 14:27:46 +03:00
Maksim Kita
8fec34af12 Constraints complex types support 2021-02-25 14:27:46 +03:00
Vasily Nemkov
2d03d330bc Extended range of DateTime64 to years 1925 - 2238
The Year 1925 is a starting point because most of the timezones
switched to saner (mostly 15-minutes based) offsets somewhere
during 1924 or before. And that significantly simplifies implementation.

2238 is to simplify arithmetics for sanitizing LUT index access;
there are less than 0x1ffff days from 1925.

* Extended DateLUTImpl internal LUT to 0x1ffff items, some of which
  represent negative (pre-1970) time values.
  As a collateral benefit, Date now correctly supports dates up to 2149
  (instead of 2106).
* Added a new strong typedef ExtendedDayNum, which represents dates
  pre-1970 and post 2149.
* Functions that used to return DayNum now return ExtendedDayNum.
* Refactored DateLUTImpl to untie DayNum from the dual role of being
  a value and an index (due to negative time). Index is now a different
  type LUTIndex with explicit conversion functions from DatNum, time_t,
  and ExtendedDayNum.
* Updated DateLUTImpl to properly support values close to epoch start
  (1970-01-01 00:00), including negative ones.
* Reduced resolution of DateLUTImpl::Values::time_at_offset_change
  to multiple of 15-minutes to allow storing 64-bits of time_t in
  DateLUTImpl::Value while keeping same size.
* Minor performance updates to DateLUTImpl when building month LUT
  by skipping non-start-of-month days.
* Fixed extractTimeZoneFromFunctionArguments to work correctly
  with DateTime64.
* New unit-tests and stateless integration tests for both DateTime
  and DateTime64.
2021-02-24 17:08:35 +02:00
kssenii
d590c32708 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into pg-ch-replica 2021-02-20 18:31:26 +00:00
Nikolai Kochetov
ed4697cffc Fix timeout in epoll_wait for RemoteQueryExecutorReadContext 2021-02-19 12:20:24 +03:00
Nikolai Kochetov
b9d6df9618 Check for eintr in epoll_wait 2021-02-19 11:49:41 +03:00
Ivan Lezhankin
dee051dc8e Merge remote-tracking branch 'upstream/master' into async-insert 2021-02-17 21:48:48 +03:00
Ivan Lezhankin
f2b1708164 Refactor inserts and its tails 2021-02-15 21:57:35 +03:00
Kruglov Pavel
598576ce70
Merge branch 'master' into hedged-requests 2021-02-15 16:51:45 +03:00
kssenii
95c93aca41 Better table sync 2021-02-13 21:03:25 +00:00
kssenii
5bc0010f94 Better 2021-02-12 21:14:36 +00:00
kssenii
0d19992128 Replicate delete queries 2021-02-12 21:12:27 +00:00
kssenii
4aadd0c3f2 Replicate insert queries 2021-02-12 21:11:55 +00:00
kssenii
b842ce114b Initial sync into ReplacingMergeTree table, select via nested table 2021-02-12 21:11:09 +00:00