Commit Graph

87 Commits

Author SHA1 Message Date
Alexander Tokmakov
d0c3b87d84 improvements 2021-09-16 00:17:54 +03:00
Vitaly Baranov
bcc31f1f3e Remove unnecessary changes. 2021-09-07 01:37:28 +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
Dmitrii Kovalkov
8acf0fa16a run generate-ya-make 2021-08-30 10:57:40 +03:00
Maksim Kita
4b8aa69e04 Fixed style check 2021-08-19 01:02:00 +03:00
Realist007
63dfa8559f
Merge branch 'master' into feature/create-simple-lambda-function 2021-08-16 16:56:49 +03:00
Raúl Marín
9f32ecca89 Merge remote-tracking branch 'blessed/master' into materialization_log 2021-08-02 16:21:10 +02:00
alesapin
916594fe23 Merge branch 'master' into evillique-nlp 2021-07-30 13:03:10 +03:00
Raúl Marín
4a09c54a04 Merge remote-tracking branch 'blessed/master' into materialization_log 2021-07-28 10:38:47 +02:00
Raúl Marín
ea5c02a605 WIP 2021-07-27 16:26:27 +02:00
Raúl Marín
07c71c226e Add QueryMaterializationLog class 2021-07-27 16:23:46 +02:00
ANDREI STAROVEROV
7966bded6c Add storing on disk for created functions 2021-07-20 23:20:23 +03:00
Alexander Tokmakov
ca45054de5 add enums 2021-07-10 00:18:20 +03:00
Nikolay Degterinsky
491ddc859d Fixed spelling and code style, added generated ya.make files 2021-06-19 18:52:09 +00:00
Realist007
60c9f7fc5d
Merge branch 'master' into feature/create-simple-lambda-function 2021-06-19 17:54:03 +03:00
Maksim Kita
005946945f RewriteFunctionToSubcolumnVisitor add into ya.make 2021-06-10 11:41:16 +03:00
ANDREI STAROVEROV
15046adba3 Add tests in excluding list of parallel runs 2021-05-15 15:48:27 +03:00
ANDREI STAROVEROV
5059d2ee9a Add ability to drop functions 2021-05-15 01:43:04 +03:00
Realist007
b3b8c4c7b9
Merge branch 'master' into feature/create-simple-lambda-function 2021-05-14 00:54:25 +03:00
ANDREI STAROVEROV
13a7169669 Add feature: create user defined function as lambda 2021-05-09 12:47:29 +03:00
Alexey Milovidov
f476a5c5d7 utils/generate-ya-make/generate-ya-make.sh 2021-05-09 03:28:10 +03:00
Maksim Kita
3cb4d1bdcb Fixed style check 2021-04-26 13:52:41 +03:00
Azat Khuzhin
fbb386dca5 Rewrite IN in query for remote shards to exclude values that does not belongs to shard
v2: fix optimize_skip_unused_shards_rewrite_in for sharding_key wrapped into function
v3: fix column name for optimize_skip_unused_shards_rewrite_in
v4: fix optimize_skip_unused_shards_rewrite_in with Null
v5:
- squash with Remove query argument for IStreamFactory::createForShard()
- use proper column after function execution (using sharding_key_column_name)
- update the test reference since (X) now is tuple(X)
2021-04-12 10:37:28 +03:00
alesapin
1c8e33414f Merge branch 'master' into johnskopis/dynamic-interserver-creds-v20 2021-04-06 16:28:46 +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
feng lv
4c30c10092 add test
fix
2021-02-26 12:14:57 +00:00
alexey-milovidov
20a7ccf5b1
Merge pull request #20174 from amosbird/alias
Normalized function names (lower-case case-insensitive names)
2021-02-21 16:23:51 +03:00
Amos Bird
f37631830f
Comments 2021-02-20 16:45:25 +08:00
Alexander Tokmakov
bf6f64a3fb Merge branch 'master' into database_replicated 2021-02-16 01:28:19 +03:00
vdimir
d9afee55ba
Add RewriteCountVariantsVisitor.cpp to ya.make 2021-02-10 12:48:41 +08:00
Alexander Tokmakov
5e0cbfe972 Merge branch 'master' into database_replicated 2021-02-08 23:01:12 +03:00
Alexander Kuzmenkov
b281d39036 yamake 2021-02-04 09:40:09 +03:00
Alexander Tokmakov
3bd4d97353 Merge branch 'master' into database_replicated 2021-01-25 14:19:04 +03:00
flynn
e75b116466
Rewrite sum(if()) and sumIf to countIf in special cases (#17041)
Co-authored-by: vdimir <vdimir@yandex-team.ru>
2021-01-21 12:01:35 +03:00
Alexander Tokmakov
7f97a11c84 Merge branch 'master' into database_replicated 2021-01-18 17:09:39 +03:00
Alexey Milovidov
31593e2000 Fix Arcadia 2021-01-16 11:10:55 +03:00
John Skopis
9bcc5a6175 Support interserver credential rotation
Restarting a server instance to change the interserver password results
in many replicas being out of sync until all clusters are using the new
credential.

This commit adds dynamic credential loading for both the client
(Replicated* tables) and server (InterserverIOHTTPHandler).

This commit also adds the ability to rotate credentials, i.e. accept more
than one credential during a credential change.

state0 (no auth):

    <interserver_http_credentials />

state1 (auth+allow_empty migration):

    <interserver_http_credentials>
        <user>admin</user>
        <password>222</password>
        <allow_empty>true</allow_empty>
    </interserver_http_credentials>

state2 (auth+new admin password migration):

    <interserver_http_credentials>
        <user>admin</user>
        <password>333</password>
        <users>
            <admin>222</admin>
        </users>
    </interserver_http_credentials>
2021-01-04 09:59:09 +00:00
sundyli
f8815f233c
Merge branch 'master' into alias_column_partition_prune 2021-01-02 11:23:55 +08:00
Alexey Milovidov
9be5fa9ef2 Merge branch 'master' into Enmk-Optimize_deduplicate 2020-12-20 09:57:10 +03:00
Amos Bird
b99f9913e1
Fix build 2020-12-18 14:13:59 +08:00
sundyli
36ca21c24a
Merge branch 'master' into alias_column_partition_prune 2020-12-13 00:45:14 +08:00
sundy-li
9407028540 update 2020-12-13 00:42:15 +08:00
Vasily Nemkov
70ea507dae OPTIMIZE DEDUPLICATE BY columns
Extended OPTIMIZE ... DEDUPLICATE syntax to allow explicit (or implicit with asterisk/column transformers) list of columns to check for duplicates on.

Following syntax variants are now supported:

OPTIMIZE TABLE table DEDUPLICATE; -- the old one
OPTIMIZE TABLE table DEDUPLICATE BY *;
OPTIMIZE TABLE table DEDUPLICATE BY * EXCEPT colX;
OPTIMIZE TABLE table DEDUPLICATE BY * EXCEPT (colX, colY);
OPTIMIZE TABLE table DEDUPLICATE BY col1,col2,col3;
OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex');
OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex') EXCEPT colX;
OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex') EXCEPT (colX, colY);

Note that * behaves just like in SELECT: MATERIALIZED, and ALIAS columns are not used for expansion.
Also, it is an error to specify empty list of columns, or write an expression that results in an empty list of columns, or deduplicate by an ALIAS column.
Column transformers other than EXCEPT are not supported.
2020-12-07 09:44:07 +03:00
Alexander Tokmakov
5ccf975a4a Merge branch 'master' into database_replicated 2020-11-24 14:38:02 +03:00
sundy-li
fe8b11fd5f add replaceAliasColumnsInFilter function 2020-11-22 12:16:27 +08:00
sundy-li
ad99dab3ad add ColumnAliasesVisitor to improve partition prune for mergetree 2020-11-21 20:38:21 +08:00
Nikolai Kochetov
013c582abf
Merge pull request #17095 from ClickHouse/actions-dag-addition
Move ActionsDAG into separate file
2020-11-17 11:17:55 +03:00
Alexey Milovidov
24f4fa6edf Follow Arcadia ya.make rules 2020-11-17 00:16:50 +03:00
Alexey Milovidov
3df04ce0c2 Follow Arcadia ya.make rules 2020-11-16 21:24:58 +03:00