Commit Graph

4405 Commits

Author SHA1 Message Date
Maksim Kita
0a12592b50 UserDefinedFunctionFactory added comments 2021-09-02 14:37:06 +03:00
Amos Bird
163a416366
Refactor 2021-09-02 19:29:14 +08:00
Nikita Mikhaylov
7f21cd7f3d save 2021-09-02 10:39:27 +00:00
Anton Popov
37f2a0a021 fix reset of parser 2021-09-02 04:45:28 +03:00
Anton Popov
5e421ab272 Merge remote-tracking branch 'upstream/master' into HEAD 2021-09-02 02:42:50 +03:00
Anton Popov
7c42ce8370 improvements of async inserts 2021-09-02 02:18:09 +03:00
Maksim Kita
be4c9102d8
Merge pull request #28438 from azat/udf-race-fix-v2
Fix race in UDF (follow up)
2021-09-01 23:57:05 +03:00
Anton Popov
5e694596c9 minor changes near async inserts 2021-09-01 18:06:11 +03:00
Nikita Mikhaylov
ceab6feb2a Fix test 2021-09-01 12:35:37 +00:00
vdimir
bf9cb8482b
Revert "Add option to getMostSubtype/getLeastSupertype to not throw exception"
This reverts commit c4654d6b45.
2021-09-01 15:08:59 +03:00
vdimir
6172cc1676
Fix build, inferJoinKeyCommonType definition 2021-09-01 15:08:58 +03:00
vdimir
ac17c0c817
Minor style src/Interpreters/TableJoin.cpp 2021-09-01 15:08:58 +03:00
vdimir
2a1c7d7336
fix typo in tryInitDictJoin 2021-09-01 15:05:48 +03:00
vdimir
450e49fd28
Throw type mismatch exception from inferJoinKeyCommonType 2021-09-01 15:05:48 +03:00
vdimir
df873866c9
Don't store converting actions in TableJoin 2021-09-01 15:05:48 +03:00
vdimir
ed8c156190
Clean up TableJoin storage join 2021-09-01 15:05:47 +03:00
vdimir
13bf141e1d
Fix storage_join type inference 2021-09-01 15:05:47 +03:00
vdimir
c4ffc2879f
Perform join type inference for USING at ExpressionAnalyzer instead of TreeRewriter 2021-09-01 15:05:47 +03:00
vdimir
33ebdb283c
Split ExpressionAnalyzer::analyzeAggregation 2021-09-01 15:05:47 +03:00
Alexander Tokmakov
f8ea865283 fix watch leak in DDLWorker 2021-09-01 12:18:28 +03:00
Azat Khuzhin
99fe4308b5 Fix race in UDF (follow up) 2021-09-01 10:38:46 +03:00
Nikita Mikhaylov
c7727f093d Merge upstream/master into global-merge-executor (using imerge) 2021-08-31 23:34:11 +00:00
alexey-milovidov
77d085f264
Merge pull request #27527 from evillique/log_queries_probability
Add log_queries_probability setting
2021-09-01 00:51:23 +03:00
Vladimir C
94d5f3a87b
Merge pull request #28349 from vdimir/issue-27691-qf
Fix non joined rows from nullable column
2021-08-31 17:09:24 +03:00
Vladimir C
3768bde572
Remove extra space in src/Interpreters/join_common.cpp 2021-08-31 17:08:35 +03:00
Vasily Nemkov
109d2f63d0 Fixed tests and minor style issues 2021-08-31 15:39:15 +03:00
vdimir
e8e26463bf
Change signature of ASTSelectQuery::arrayJoinExpressionList 2021-08-31 15:27:44 +03:00
vdimir
34b9bd7d33
Fix build: missing argument in inferJoinKeyCommonType 2021-08-31 15:27:44 +03:00
vdimir
3443b3b5c4
Separate functoin buildJoinedPlan, minor refactoring 2021-08-31 15:27:44 +03:00
vdimir
30e112d6a6
Do not convert join key columns for storage/dict join 2021-08-31 15:27:43 +03:00
vdimir
c4654d6b45
Add option to getMostSubtype/getLeastSupertype to not throw exception 2021-08-31 15:27:25 +03:00
vdimir
becd288cb9
Try to remove useless applyJoinKeyConvert 2021-08-31 15:18:44 +03:00
Nikita Mikhaylov
f8d4f04294 Merge upstream/master into global-merge-executor (using imerge) 2021-08-31 11:52:11 +00:00
alesapin
525999145e
Merge pull request #26791 from ClickHouse/async-reads
Experiment with asynchronous readers
2021-08-31 13:17:45 +03:00
Maksim Kita
4ebd0ae941
Merge pull request #28102 from ClickHouse/executable-table-function
Merging #23192
2021-08-31 12:00:50 +03:00
Anton Popov
fb0790cf82 slightly better 2021-08-31 05:35:36 +03:00
Anton Popov
36ac20681e refactor AsynchronousInsertQueue 2021-08-31 05:16:02 +03:00
Alexey Milovidov
ca6f6306f3 Merge branch 'master' into async-reads 2021-08-31 02:52:58 +03:00
Maksim Kita
c1482ee45b CHJIT added PageArena 2021-08-30 22:42:35 +03:00
Nikita Mikhaylov
c4416906c8 done 2021-08-30 19:37:03 +00:00
Vasily Nemkov
3ca0b0c860 Fixed GCC-9 build 2021-08-30 19:08:02 +03:00
alexey-milovidov
ea84b939c2
Merge pull request #28333 from DimasKovas/try_to_fix_arcadia_2_30_08_2021
Try to fix arcadia build
2021-08-30 18:53:14 +03:00
Vasily Nemkov
c902afddde Added system.session_log table
Which logs all the info about LogIn, LogOut and LogIn Failure events.
Additional info that is logged:
- User name
- event type (LogIn, LogOut, LoginFailure)
- Event date\time\time with microseconds
- authentication type (same as for IDENTIFIED BY of CREATE USER statement)
- array of active settings profiles upon login
- array of active roles upon login
- array of changed settings with corresponding values
- client address and port
- interface (TCP\HTTP\MySQL\PostgreSQL, etc.)
- client info (name, version info)
- optional LoginFailure reason text message.

Added some tests to verify that events are properly saved with all necessary info via following interfaces:
- TCP
- HTTP
- MySQL

Known limitations
- Not tested against named HTTP sessions, PostgreSQL and gRPC, hence those are not guaranteed to work 100% properly.
2021-08-30 18:28:28 +03:00
Anton Popov
8f60c4b8d2 remove stale loogs from asynchronous insertion queue 2021-08-30 16:37:27 +03:00
vdimir
943b71e4ff
Fix non joined rows from nullable column 2021-08-30 16:33:01 +03:00
Kseniia Sumarokova
00bea71610
Merge pull request #25251 from kssenii/disk-over-web-server
ClickHouse over web server with static files
2021-08-30 16:18:59 +03:00
tavplubix
b47f34aa17
Merge pull request #28313 from amosbird/fastload
Fast data parts loading by delaying table startup process
2021-08-30 13:53:55 +03:00
Nikolay Degterinsky
b9ea863a88 Remove unnecessary include 2021-08-30 12:58:56 +03:00
Nikolay Degterinsky
2433d88b82 Merge branch 'master' into log_queries_probability 2021-08-30 12:55:33 +03:00
Nikolay Degterinsky
c9adef001d Change settings earlier 2021-08-30 12:52:35 +03:00
Dmitrii Kovalkov
2c8e2c6995 Fix arcadia build 2021-08-30 12:19:13 +03:00
Vladimir Chebotarev
de5daa22ab Revert "MATERIALIZE COLUMN xxx FINAL"
This reverts commit bf1430c1ec.
2021-08-30 11:50:26 +03:00
Vladimir Chebotarev
40bedd88e7 One more fix. 2021-08-30 11:50:01 +03:00
Vladimir Chebotarev
0d6e0181d6 MATERIALIZE COLUMN xxx FINAL 2021-08-30 11:49:59 +03:00
Vladimir Chebotarev
428657b14f 2. Draw the rest of that owl. 2021-08-30 11:49:26 +03:00
Vladimir Chebotarev
ce0850007f 1. Draw some circles. 2021-08-30 11:49:26 +03:00
Dmitrii Kovalkov
8acf0fa16a run generate-ya-make 2021-08-30 10:57:40 +03:00
Amos Bird
de9e591619
Fast load by delaying table startup 2021-08-30 10:15:32 +08:00
Alexey Milovidov
e4f3d97b52 Merge branch 'master' of github.com:yandex/ClickHouse into async-reads 2021-08-29 21:42:14 +03:00
zhongyuankai
72e05cda1f Merge branch 'master' into add-system-of-table_views 2021-08-28 11:32:58 +08:00
Alexey Milovidov
79e0433ba7 Merge branch 'master' of github.com:yandex/ClickHouse into async-reads 2021-08-28 01:19:16 +03:00
Anton Popov
7aec53bb8f handle all exceptions during async inserts 2021-08-28 01:07:28 +03:00
Anton Popov
9e67943878 add waiting for async inserts 2021-08-28 00:29:10 +03:00
tavplubix
481cc011c7
Merge pull request #28212 from azat/zookeeper_log-improvements
zookeeper_log improvements
2021-08-27 16:22:52 +03:00
Maksim Kita
2e4da05708 CHJIT custom memory manager 2021-08-27 13:35:07 +03:00
Nikolai Kochetov
34f4bd3e72
Merge pull request #28178 from amosbird/projection-fix14
Projection bug fixes and refactoring.
2021-08-27 11:47:46 +03:00
Anton Popov
e8ac8e3454 execute asynchronous inserts separatly for each client 2021-08-27 06:00:12 +03:00
Alexey Milovidov
7df2532d60 Fix style 2021-08-27 04:29:37 +03:00
Alexey Milovidov
864d01e564 Add pread_fake_async method 2021-08-27 03:35:04 +03:00
Alexey Milovidov
46732e781f Merge branch 'master' of github.com:yandex/ClickHouse into async-reads 2021-08-27 01:57:48 +03:00
alexey-milovidov
3d38604c55
Update executeQuery.cpp 2021-08-27 00:59:58 +03:00
Azat Khuzhin
5bb0a91f83 Fix system.zookeeper_log.address (Before it always contains "::") 2021-08-27 00:41:06 +03:00
Azat Khuzhin
f342acc2ad Guard UDF container with a lock
Fixes TSAN report [1]:

    WARNING: ThreadSanitizer: data race (pid=436)
      Write of size 8 at 0x7b040076e450 by thread T240:
        ...
        3 DB::UserDefinedFunctionFactory::registerFunction() obj-x86_64-linux-gnu/../src/Interpreters/UserDefinedFunctionFactory.cpp:30:56 (clickhouse+0x1500727f)
        4 DB::InterpreterCreateFunctionQuery::execute() obj-x86_64-linux-gnu/../src/Interpreters/InterpreterCreateFunctionQuery.cpp:37:44 (clickhouse+0x14b1224a)
        5 DB::executeQueryImpl() obj-x86_64-linux-gnu/../src/Interpreters/executeQuery.cpp:573:32 (clickhouse+0x15039241)
        6 DB::executeQuery() obj-x86_64-linux-gnu/../src/Interpreters/executeQuery.cpp:934:30 (clickhouse+0x150376fa)
        7 DB::TCPHandler::runImpl() obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:291:24 (clickhouse+0x15a7af2a)

      Previous read of size 8 at 0x7b040076e450 by thread T1370:
        ...
        2 DB::UserDefinedFunctionFactory::tryGet() const obj-x86_64-linux-gnu/../src/Interpreters/UserDefinedFunctionFactory.cpp:65:45 (clickhouse+0x150078a4)
        3 DB::UserDefinedFunctionsMatcher::tryToReplaceFunction() obj-x86_64-linux-gnu/../src/Interpreters/UserDefinedFunctionsVisitor.cpp:39:73 (clickhouse+0x15007cd0)
        4 DB::UserDefinedFunctionsMatcher::visit() obj-x86_64-linux-gnu/../src/Interpreters/UserDefinedFunctionsVisitor.cpp:27:19 (clickhouse+0x15007ba8)
        5 DB::InDepthNodeVisitor<>::visit() obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:34:13 (clickhouse+0x14fbcba4)
        ..
        24 DB::executeQueryImpl() obj-x86_64-linux-gnu/../src/Interpreters/executeQuery.cpp:543:28 (clickhouse+0x15038f3b)

  [1]: https://clickhouse-test-reports.s3.yandex.net/0/df1fe27791f82c2a917390faa30716effbd32b8f/stress_test_(thread).html#fail1
2021-08-27 00:39:11 +03:00
Nikolay Degterinsky
7c66ad051d Fix 2021-08-26 16:42:49 +03:00
Nikolay Degterinsky
75575505cf Merge branch 'master' into log_queries_probability 2021-08-26 16:32:49 +03:00
zhongyuankai
042d17531c system.views add columns type 2021-08-26 20:05:01 +08:00
Amos Bird
0169fce78e
Projection bug fixes and refactoring. 2021-08-26 19:09:31 +08:00
alesapin
47b995467e
Merge pull request #28080 from ClickHouse/some_renames_in_keeper
Clickhouse-keeper: renames and comments
2021-08-26 10:16:21 +03:00
Anton Popov
6d3274c22c Merge remote-tracking branch 'upstream/master' into HEAD 2021-08-26 03:31:46 +03:00
Alexey Milovidov
3cb9cf7242 Merge branch 'master' of github.com:yandex/ClickHouse into async-reads 2021-08-26 01:55:46 +03:00
Alexey Milovidov
d8250ab3d6 Preparation 2021-08-26 01:14:42 +03:00
Maksim Kita
6ccdde4a88 Updated TableFunctionExecutable 2021-08-25 22:30:22 +03:00
alesapin
eaa49f56dd
Merge pull request #27019 from lthaooo/materialize_ttl_recalculate_only
Improvement of Materialize TTL
2021-08-25 19:10:20 +03:00
Nikolay Degterinsky
2c81a35b4e Add setting 2021-08-25 17:41:21 +03:00
zhongyuankai
3e18e22cfb update api 2021-08-25 20:20:05 +08:00
zhongyuankai
64efa917d8 review system.views 2021-08-25 18:11:40 +08:00
zhongyuankai
52570b1c80 Merge branch 'master' into add-system-of-table_views 2021-08-25 15:59:23 +08:00
Alexey Milovidov
53ca1ebca6 Be in style 2021-08-25 03:58:49 +03:00
Alexey Milovidov
8f57216180 Progress on development 2021-08-25 00:45:58 +03:00
Maksim Kita
dce3fc60ad Fixed build 2021-08-24 19:13:38 +03:00
Maksim Kita
82ba24cd10 Merge branch 'master' into create-user-defined-lambda-function 2021-08-24 19:12:32 +03:00
alesapin
95cf0634dc Clickhouse-keeper: renames and comments 2021-08-24 15:30:31 +03:00
OnePiece
17ba4c620e
Merge branch 'ClickHouse:master' into add-system-of-table_views 2021-08-24 20:20:24 +08:00
OnePiece
40673aa1f5
Update DatabaseCatalog.cpp 2021-08-24 20:05:29 +08:00
OnePiece
01f4e2e0e0
Update DatabaseCatalog.h 2021-08-24 20:03:49 +08:00
mergify[bot]
ae22bab2c4
Merge branch 'master' into materialize_ttl_recalculate_only 2021-08-24 08:49:19 +00:00
kssenii
b536653851 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into disk-over-web-server 2021-08-24 07:29:50 +00:00
Vladimir C
98acccbdcc
Merge branch 'master' into s3partitionedwrite 2021-08-24 10:03:57 +03:00
kssenii
5307d31924 Throw for alter and silence for drop 2021-08-23 23:48:53 +00:00
Vitaly Baranov
63e8bc1f20 Added new commands BACKUP and RESTORE. 2021-08-23 23:41:45 +03:00
Maksim Kita
010d72593f Fixed integration tests 2021-08-23 17:31:58 +03:00
Nikita Mikhaylov
fb6462d70a
Merge pull request #27886 from vitlibar/add-separate-constants-for-interfaces
Add separate constants for interfaces LOCAL and TCP_INTERSERVER.
2021-08-23 16:25:01 +03:00
Maksim Kita
2a6aa50d49 Merge branch 'master' into create-user-defined-lambda-function 2021-08-23 11:08:49 +03:00
Vladimir Chebotarev
c008eab31a Review fixes. 2021-08-23 09:22:13 +03:00
Vladimir Chebotarev
d1efe3afa7 Review fixes. 2021-08-23 09:22:13 +03:00
Vitaly Baranov
ba80e1c8cd
Merge pull request #27983 from vitlibar/fix-checking-grant-option-for-grant-with-replace-option-2
Fix checking access rights when executing GRANT WITH REPLACE OPTION on cluster
2021-08-22 21:59:06 +03:00
Vitaly Baranov
8e9173c21d Fix checking access rights when executing GRANT WITH REPLACE OPTION on cluster. 2021-08-22 12:14:23 +03:00
alexey-milovidov
e620ea15bd
Merge pull request #27900 from amosbird/newf
getServerPort function
2021-08-21 22:40:25 +03:00
Amos Bird
997acdc39e
getPort function 2021-08-21 20:33:36 +08:00
alexey-milovidov
5ac6a99542
Merge pull request #27927 from ClickHouse/fix_27832
Сheck cluster name before creating Distributed
2021-08-21 10:40:23 +03:00
Kseniia Sumarokova
19afb22b4d
Merge pull request #27932 from amosbird/constkeys
Add a setting to bring back the old behavior of grouping by constant keys on empty set.
2021-08-21 08:02:30 +03:00
Kseniia Sumarokova
38a35c1d9e
Merge pull request #27530 from kssenii/col-identifier-as-col-number
Allow positional arguments for group by, order by, limit by
2021-08-20 21:08:58 +03:00
Amos Bird
5708ed42ec
Add setting.
empty_result_for_aggregation_by_constant_keys_on_empty_set
2021-08-20 22:34:32 +08:00
Alexander Tokmakov
8c6dd18917 check cluster name before creating Distributed 2021-08-20 14:55:04 +03:00
kssenii
c6f456b241 Fix build 2021-08-20 09:09:46 +00:00
Maksim Kita
5f2b28639f Merge branch 'master' into create-user-defined-lambda-function 2021-08-20 11:53:08 +03:00
Kruglov Pavel
5a282e8947
Merge pull request #27875 from vitlibar/fix-shutdown-named-session-storage
Fix shutdown of NamedSessionStorage.
2021-08-20 11:50:43 +03:00
Vitaly Baranov
3ab1177d7e Add separate constants for interface LOCAL and TCP_INTERSERVER. 2021-08-19 23:04:36 +03:00
Vitaly Baranov
c257cd61e5
Merge pull request #27817 from vitlibar/use-sessions-more
Use sessions more
2021-08-19 22:51:08 +03:00
Vitaly Baranov
c263523f50 Remove unused declaration. 2021-08-19 22:45:40 +03:00
Kruglov Pavel
7fe7103e53
Merge pull request #27299 from vdimir/issue-27091-v2
Refactor NotJoined
2021-08-19 19:16:32 +03:00
kssenii
ec9323f4bd Fix review comment 2021-08-19 15:55:45 +00:00
kssenii
512d66a088 Fix 2021-08-19 15:19:11 +00:00
Vitaly Baranov
9fecda940d Fix shutdown of NamedSessionStorage. 2021-08-19 17:27:03 +03:00
tavplubix
f94b0b8d3f
Update DDLWorker.cpp 2021-08-19 13:19:48 +03:00
Kseniia Sumarokova
34f5787f0a
Merge pull request #27824 from den-crane/patch-25
Fix setting name "allow_experimental_database_materialized_postgresql" in the error message
2021-08-19 11:25:54 +03:00
Nikolai Kochetov
3e44ef437e
Merge pull request #26639 from ClickHouse/fix-bad-cast
Fix bad cast
2021-08-19 11:17:26 +03:00
Vladimir C
781b8123a5 Remove logging from NotJoinedBlocks 2021-08-19 09:55:18 +03:00
Vitaly Baranov
3b09640d94 Use sessions more. 2021-08-19 02:22:09 +03:00
Vitaly Baranov
65ee9a1272
Merge pull request #26864 from vitlibar/refactor-sessions
Introduce sessions
2021-08-19 01:38:51 +03:00
Maksim Kita
4b8aa69e04 Fixed style check 2021-08-19 01:02:00 +03:00
Maksim Kita
01682a86b3 Updated user defined functions implementation 2021-08-19 00:54:55 +03:00
Maksim Kita
75cb85846f
Merge pull request #27804 from amosbird/fixshutdown
Proper shutdown global context
2021-08-18 22:11:38 +03:00
Denny Crane
df3ba20642
Update InterpreterCreateQuery.cpp
Fix setting name "allow_experimental_database_materialized_postgresql"
2021-08-18 12:05:43 -03:00
Vitaly Baranov
fabd7193bd Code cleanups and improvements. 2021-08-18 14:24:52 +03:00
Vasily Nemkov
51ffc33457 Introduce sessions.
This is required to add system.session_log table.
2021-08-18 14:24:52 +03:00
Nikolai Kochetov
a46fe11e2c Try fix test_mutations_with_merge_background_task 2021-08-18 13:30:02 +03:00
Maksim Kita
6b2c249adc Updated UserDefinedObjectsLoader 2021-08-18 12:29:52 +03:00
vdimir
ca67bf0e5a
Fix NotJoinedBlocks::read, add logging 2021-08-18 11:18:33 +03:00
Amos Bird
523de98e2d
Proper shutdown global context 2021-08-18 15:23:32 +08:00
Kseniia Sumarokova
78105ecba7
Merge pull request #27757 from kssenii/fix-intersect-cast
Fix intersect/except with limit
2021-08-17 21:37:37 +03:00
Maksim Kita
8403f381da
Merge pull request #23978 from Realist007/feature/create-simple-lambda-function
Feature/create simple lambda function
2021-08-17 21:22:31 +03:00
tavplubix
6eb15eb949
Update DDLWorker.cpp 2021-08-17 17:05:37 +03:00
vdimir
2dfbbe364b
Do not use BlockInputStream for NonJoined 2021-08-17 16:30:01 +03:00
vdimir
9d8178d04c
Refactor NotJoined pt2: rename classes, get rig of inheritance 2021-08-17 13:32:16 +03:00
vdimir
afa748c717
Refactor NotJoined pt1 2021-08-17 13:32:16 +03:00
Nikolai Kochetov
98eb619b4b
Merge pull request #23367 from Avogar/short-circuit
Implement short circuit function evaluation
2021-08-17 12:36:07 +03:00
kssenii
8da7f406af Better comment 2021-08-17 11:03:01 +03:00
Vladimir C
baa54d2a3b
Merge pull request #27652 from vdimir/aliased_column_distributed_bug 2021-08-17 09:39:33 +03:00
Kseniia Sumarokova
6001c7f214
Update InterpreterSelectQuery.cpp 2021-08-17 08:44:51 +03:00