Commit Graph

5162 Commits

Author SHA1 Message Date
alesapin
982eae7b30 Remove redundant change 2019-11-07 11:49:09 +03:00
alesapin
18e59f2771 Remove some functions from mutations interpreter 2019-11-07 11:40:36 +03:00
Amos Bird
544af39d23
Vectorize arrayReduce and -Array combinator
Also devirtualize -State combinator.
2019-11-07 11:53:47 +08:00
chertus
252fab54a2 less specializations 2019-11-06 23:25:27 +03:00
chertus
d388918c60 Join.cpp refactoring 2019-11-06 22:40:53 +03:00
Azat Khuzhin
0677ae048c Wrap _shard_num with toUInt32 for simpler JOIN with system.clusters.shard_num 2019-11-06 21:02:42 +03:00
alesapin
8c7deaa70d More safier, but still ugly mutations interpreter 2019-11-06 20:28:03 +03:00
Azat Khuzhin
81aeff2d2a Add _shard_num virtual column for the Distributed engine
With JOIN from system.clusters one can figure out from which server data
came.

TODO:
- optimization to avoid communicating with unrelated shards (for queries
  like "AND _shard_num = n")
- fix aliases (see tests with serverError expected)

v0: AddingConstColumnBlockInputStream
v2: VirtualColumnUtils::rewriteEntityInAst
v3: fix remote(Distributed) by appending _shard_num only if has been requested
2019-11-06 15:26:12 +03:00
Alexander Kuzmenkov
233212ac68
Merge pull request #7531 from amosbird/getkeymapped
Unify hash tables interface (separated for review)
2019-11-06 13:49:39 +03:00
Nikolai Kochetov
86a9c2b98e Try to fix tests. 2019-11-06 12:45:47 +03:00
alexey-milovidov
78f7826a09
Update InterpreterSelectQuery.cpp 2019-11-06 11:17:26 +03:00
chertus
950e95c178 support JOIN ON expression 2019-11-05 23:22:20 +03:00
Nikolai Kochetov
055f21c9b7 Less wrappers for procesors pipeline. 2019-11-05 20:33:03 +03:00
Amos Bird
fbfbe161ec
Unify hash tables interface. 2019-11-06 00:08:04 +08:00
millb
d62cd6efa8 Merge branch 'master' into url_engine_problem 2019-11-05 14:42:53 +03:00
alexey-milovidov
81e33ca817
Merge pull request #7586 from 4ertus2/joins
Rewrite NonJoinedBlockInputStream
2019-11-04 14:49:47 +03:00
alexey-milovidov
782e2f6c13
Merge pull request #7606 from amosbird/nullformat
Better Null format for tcp handler.
2019-11-04 14:27:27 +03:00
Amos Bird
8f902dc2a9
Better null format for tcp handler. 2019-11-04 11:53:26 +08:00
chertus
b7b664845d return right x in RIGHT|FULL JOIN .. USING(x) from NonJoinedBlockInputStream if not qualified 2019-11-03 23:30:49 +03:00
chertus
d4e1468022 fix Join.saved_block_sample columns' nullability 2019-11-03 22:33:59 +03:00
Amos Bird
f0b3c1f7c7
early constant folding improvement 2019-11-03 21:17:46 +08:00
alexey-milovidov
dda93e2275
Merge pull request #7561 from ClickHouse/achimbab-master
Merge for #7363
2019-11-02 00:57:13 +03:00
chertus
334b91f351 revrite NonJoinedBlockInputStream (in progress) 2019-11-01 20:41:07 +03:00
Nikolai Kochetov
239d92a94c Code cleanup. 2019-11-01 18:31:02 +03:00
Nikolai Kochetov
575eabd4ff Add flag to set that set is created. 2019-11-01 16:56:33 +03:00
alexey-milovidov
4081b0be90
Merge pull request #7497 from amosbird/countopt
Early constant folding.
2019-11-01 16:54:02 +03:00
Nikolai Kochetov
1f7a798c97 Add flag to set that set is created. 2019-11-01 13:58:29 +03:00
Nikolai Kochetov
d31cac33b2 Small fixes. 2019-11-01 12:41:20 +03:00
Nikolai Kochetov
5bb47e2484
Merge pull request #7181 from ClickHouse/processors-and-storages
Processors and storages
2019-11-01 12:04:49 +03:00
Nikolai Kochetov
c0fccd5b87 Simplified code. 2019-11-01 11:32:41 +03:00
Nikolai Kochetov
9a5a0a2a3b Fix types for set elements. 2019-10-31 19:14:06 +03:00
Vitaly Baranov
56011d4649
Merge pull request #7553 from vitlibar/add-constraints-columns-to-table-system-settings
Add constraints columns to table system.settings
2019-10-31 19:06:46 +03:00
Amos Bird
e04cdd4ebb
Early constant folding. 2019-10-31 23:54:32 +08:00
Nikolai Kochetov
a80338e066 Merged with master 2019-10-31 14:41:29 +03:00
Vitaly Baranov
272608762e Fix comment. 2019-10-31 11:45:14 +03:00
Vitaly Baranov
5601d6ae66 Add constraints columns to table system.settings 2019-10-31 01:45:57 +03:00
alexey-milovidov
0d2a2c332f
Merge pull request #7366 from achimbab/fixbug_inop
Made IN operator support Array(LowCardinality(Nullable(String)))
2019-10-31 00:26:22 +03:00
alexey-milovidov
883c868b36
Merge pull request #7523 from ClickHouse/fix-thread-context-attach
Disable context replacement for internal queries
2019-10-31 00:07:13 +03:00
Alexey Milovidov
fe73354320 Improvements after #7510 2019-10-30 22:15:55 +03:00
alexey-milovidov
ddb58eeb8b
Merge pull request #7510 from amosbird/smartcount
Instant count() for MergeTree
2019-10-30 20:42:00 +03:00
Artem Zuikov
0f68c5a12a
Merge pull request #7530 from 4ertus2/joins
Fix right table key nullability (join_use_keys = 0)
2019-10-30 13:30:27 +03:00
Ivan
4f2f5cca84
Add support for cross-compiling to the CPU architecture AARCH64 (#7370) 2019-10-30 10:01:53 +03:00
chertus
deb2406b30 fix JOIN right table keys nullability 2019-10-29 22:39:42 +03:00
chertus
12b57aedf0 remove error prone code 2019-10-29 16:52:05 +03:00
alesapin
cde07dd620 Disable context replacement for internal queries 2019-10-29 13:27:19 +03:00
Amos Bird
2c75a51d4f
Instant count() for MergeTree
Use (Replicated)MergeTree's metadata to do trivial count()
2019-10-29 17:45:47 +08:00
Nikolai Kochetov
43c8d13de6
Merge pull request #7496 from amosbird/fix15
Fix HAVING without GROUP BY
2019-10-28 02:44:24 +03:00
Amos Bird
77bdfb3350
Fix HAVING without GROUP BY 2019-10-27 22:10:54 +08:00
alesapin
04ca163518 Merge branch 'master' into dictionaries_ddl_loader 2019-10-25 10:58:04 +03:00
chertus
f2028e901d review related changes 2019-10-24 16:04:50 +03:00
chertus
12cd21f3c3 Merge branch 'master' into ast 2019-10-24 15:20:09 +03:00
Artem Zuikov
39b64dff87
Merge pull request #7454 from 4ertus2/refactoring
Refactoring: extract non aliases logic out of QueryNormalizer
2019-10-24 14:34:53 +03:00
alesapin
a6199b7e69 Merge with master 2019-10-24 12:33:40 +03:00
chertus
20093fa065 extract more logic out of QueryNormalizer 2019-10-23 16:59:03 +03:00
Amos Bird
295864e6e0
better scalar query 2019-10-23 21:37:54 +08:00
alesapin
c3519ff376 Better check of dictionary lifetime for updates 2019-10-23 16:02:40 +03:00
Alexander Kuzmenkov
1a609c27bd
Merge pull request #6243 from ClickHouse/aku/hashtables
Introduce String Hash Map to speed up aggregation over short string keys.
2019-10-23 12:52:50 +03:00
alesapin
6a0246f58e Fix if 2019-10-23 12:40:09 +03:00
alesapin
0abb2e538b Remove strange logic 2019-10-23 12:36:20 +03:00
alesapin
fb349757ba Fix ubsan error 2019-10-23 12:27:34 +03:00
alesapin
dc6090a2ac More readable code in external loader 2019-10-22 16:41:17 +03:00
alesapin
ae42dd1cea Better doLoading locking logic 2019-10-22 15:57:58 +03:00
alesapin
d3461f9d46 TODO comments 2019-10-22 14:03:16 +03:00
alesapin
4c5d150d7a Review fixes 2019-10-22 13:47:43 +03:00
Ivan
7ba4e36e73
Don't push to MVs when inserting into Kafka table (#7265)
* Do not insert values into MV when inserting directly to Kafka
* Add method noPushingToViews() to IStorage interface
  To separate InterpreterInsertQuery and StorageKafka
2019-10-22 13:31:28 +03:00
Nikolai Kochetov
2b334a4adb Review fixes. 2019-10-21 19:26:29 +03:00
chertus
851b00c99f minor visitors improvement 2019-10-21 19:22:54 +03:00
Nikolai Kochetov
2893c35930 Merged with master. 2019-10-21 18:33:44 +03:00
alesapin
ff7850cfbd Remove strange code in favor of less strange code 2019-10-21 17:59:35 +03:00
millb
8b8ca9a141 Support redirect improvement 2019-10-21 17:45:57 +03:00
alesapin
f7043c38bd Less diff 2019-10-21 17:20:42 +03:00
alesapin
fc05110d66 Better naming 2019-10-21 17:07:47 +03:00
alesapin
e4a936cf41 Fix add and reload 2019-10-21 16:54:23 +03:00
Amos Bird
a864447802 Introduce String Hash Map.
It speeds up aggregation over short string keys. Use it as a default
aggregation method for string keys.
2019-10-21 16:27:35 +03:00
chertus
4f0859a5fa Merge branch 'master' into ast 2019-10-21 15:08:05 +03:00
chertus
5ef7376cbf fix distributed join on 2019-10-21 14:22:22 +03:00
alesapin
26c87e46c9 Merge branch 'master' into dictionaries_ddl_loader 2019-10-21 11:46:49 +03:00
alesapin
35e66d6696 Merge with master 2019-10-21 11:46:11 +03:00
millb
f64f6658ce Merge branch 'master' into url_engine_problem 2019-10-21 11:44:31 +03:00
alexey-milovidov
8b8cc67873
Merge pull request #7390 from azat/processlist-log-queue_max_wait_ms
Add a message in case of queue_wait_max_ms wait takes place
2019-10-20 17:55:36 +03:00
Azat Khuzhin
94948c2579 Add a message in case of queue_wait_max_ms wait takes place
Since there no information about this, while this can be interesting,
for example to tune max_concurrent_queries in some cases.
2019-10-18 23:36:12 +03:00
chertus
c5a850240c better ambiguous column detection in multiple join rewriter 2019-10-18 20:09:17 +03:00
chertus
2533652847 columns match priority: table alias > table name> aliased table name 2019-10-18 19:16:57 +03:00
alesapin
cdc195727e Fix some races from lazy load and add ugly interface to loader (need to be refactored) 2019-10-18 19:04:09 +03:00
Alexander Kuzmenkov
5e2cc37381
Distinguish Array and Tuple field types when creating from array of Fields. (#7179) 2019-10-18 18:57:05 +03:00
Alexander Kuzmenkov
3143fa37d7
Merge pull request #7371 from CurtizJ/fix-optimize-read-in-order
Fix optimize_read_in_order with IN and a subquery.
2019-10-18 15:55:53 +03:00
philip.han
5f1b14e313 Remove a dynamically sized array in BloomFilterHash.h 2019-10-18 19:39:10 +09:00
philip.han
1d423fad73 Blocked "nested-array-type" for the bloom_filter 2019-10-18 11:55:01 +09:00
chertus
0f6176cc2d throw on ambiguous qualified column 2019-10-18 00:08:28 +03:00
alesapin
c29b39002d Fix race condition, add test 2019-10-17 20:36:53 +03:00
alesapin
05392fd882 Fix deadlock, add test and refactoring 2019-10-17 20:18:54 +03:00
tavplubix
0046b9f137 Wait for jobs to finish on exception (fixes rare segfaults) (#7350) 2019-10-17 17:41:27 +03:00
Alexander Kuzmenkov
b62c9e729d
Merge pull request #7215 from ClickHouse/formats_improvements
Miscellaneous formats improvements
2019-10-17 17:37:38 +03:00
CurtizJ
546414c015 fix optimize_read_in_order with in subquery 2019-10-17 16:11:27 +03:00
alesapin
6dfe5c7142 Better introspection 2019-10-17 16:05:12 +03:00
Ivan
e595df05d9
Fix CREATE TABLE AS from table with virtual columns (#7183)
* Disable undefined instrumentation for rdkafka
2019-10-17 14:12:35 +03:00
philip.han
08a348fbd1 Made IN operator support Array(LowCardinality(Nullable(String))) 2019-10-17 19:08:36 +09:00
alesapin
3987a45ea2 Fix build and style 2019-10-17 12:05:48 +03:00
alesapin
a19a699bef Fix confused variables 2019-10-16 20:52:56 +03:00
chertus
483108f46f column to table matching refactoring 2019-10-16 20:33:53 +03:00
alesapin
01e23f0a22 Better load of dictionaries 2019-10-16 20:06:52 +03:00
alesapin
b4e0ded048 Almost working 2019-10-16 17:59:52 +03:00
chertus
e6e88241fc SyntaxAnalyzer refactoring: better getTablesWithColumns() 2019-10-16 17:47:58 +03:00
Alexander Tokmakov
aa9d29d6ae Merge branch 'master' into formats_improvements 2019-10-16 17:15:13 +03:00
Artem Zuikov
b70ca30447
Merge pull request #7335 from 4ertus2/ast
Remove asterisk_left_columns_only setting
2019-10-16 13:57:17 +03:00
Artem Zuikov
3ceeb95145
Merge pull request #7282 from 4ertus2/asof
ASOF JOIN inequalities
2019-10-16 13:46:52 +03:00
philip.han
a2bf848e12 Made bloom_filter type of index supporting LowCardinality and Nullable 2019-10-16 15:22:56 +09:00
alesapin
e690a3ca32 Half working code 2019-10-15 21:04:17 +03:00
chertus
ccc8c1ad2a restore logic for array join (it's probably a hidden error) 2019-10-15 20:39:23 +03:00
Artem Zuikov
cf99f88bc4 PartialMergeJoin flush data on disk (#7186) 2019-10-15 19:31:49 +03:00
chertus
c727777a9c resolve some for review sentences 2019-10-15 18:49:00 +03:00
chertus
9667e54201 remove asterisk_left_columns_only setting 2019-10-15 17:42:57 +03:00
alesapin
3e068b81de Add loading of external dictionaries 2019-10-15 17:09:57 +03:00
Alexander Kuzmenkov
160d8a6416 Ignore non-convertible values at any depth on the right side of IN
operator.

The values that are not convertible to the left argument type can't
match anyway, so it is safe to discard them.
2019-10-14 14:25:03 +03:00
alesapin
ecde224692 More tests 2019-10-14 12:52:43 +03:00
alesapin
155731a676 Merge branch 'master' into dictionaries_ddl_interpreter 2019-10-14 11:49:18 +03:00
Nikolai Kochetov
757488369f Merge branch 'master' into processors-3 2019-10-12 19:24:02 +03:00
Nikolai Kochetov
51bce40d5e
Merge pull request #7284 from ClickHouse/fix-7216
Fix for #7216
2019-10-12 19:20:33 +03:00
Alexander Kuzmenkov
31bd359100
Merge pull request #7231 from ClickHouse/aku/podarray-includes
Include PODArray.h into fewer files.
2019-10-12 15:08:41 +03:00
Nikolai Kochetov
25510e3d38 Try to fix perftests. 2019-10-12 13:06:07 +03:00
chertus
91c7ae83a3 asof join inequalities 2019-10-11 20:56:26 +03:00
Nikolai Kochetov
217eab0cfa Fix test. 2019-10-11 20:55:33 +03:00
Nikolai Kochetov
2684bd0d5e Fixes for 7216 2019-10-11 20:27:54 +03:00
alesapin
967fe64793 Add simpliest tests 2019-10-11 18:22:30 +03:00
Vitaly Baranov
8c24d5e66a
Merge pull request #7235 from vitlibar/RBAC-1
RBAC-1
2019-10-11 17:16:32 +03:00
alesapin
ae42dc0d4c Attach detach and introspection queries for dictionaries 2019-10-11 16:21:52 +03:00
Alexander Kuzmenkov
8a1d57bddb Include PODArray.h into fewer files. 2019-10-11 14:28:16 +03:00
alesapin
3dfe961291 Merge branch 'master' into dictionaries_ddl_interpreter 2019-10-11 12:14:07 +03:00
Vitaly Baranov
060257c8c5 Remove Authentication::setType() function and fix comments. 2019-10-11 00:48:36 +03:00
Nikolai Kochetov
e48755d045 Merge branch 'master' into processors-and-storages 2019-10-11 00:46:37 +03:00
Nikolai Kochetov
9a89ee8eab
Merge pull request #7264 from ClickHouse/disable-memory-tracker-for-stack-trace
Disable memory tracker for exception stack.
2019-10-11 00:45:36 +03:00
Vitaly Baranov
18ccb4d64d Move backQuote() and quoteString() to a separate file, use StringRefs. 2019-10-11 00:18:52 +03:00
Vitaly Baranov
9f6d9d6130 Move the code which checks client host to a separate class. 2019-10-11 00:18:52 +03:00
Vitaly Baranov
12d1d87d64 Move authentication code to a separate class. 2019-10-11 00:18:52 +03:00
alesapin
2a5713e6e4 Compilable code 2019-10-10 23:47:47 +03:00
Nikolai Kochetov
0ce86e1f8f Disable memory tracker for exception stack. 2019-10-10 21:55:16 +03:00
alexey-milovidov
9c1c596146
Merge pull request #7252 from ClickHouse/fix-bad-code-in-transform-query-for-external-database
Fix bad code in transforming query for external database.
2019-10-10 21:10:36 +03:00
alesapin
67fc3347c2 Preparing databases for dictionaries 2019-10-10 20:33:01 +03:00
Nikolai Kochetov
742b948156 Disable memory tracker for exception stack. 2019-10-10 19:30:33 +03:00
Alexander Kazakov
03c7b7ff8d
Prevent from using non-deterministic functions in mutations of replicated tables (#7247)
* Added isDeterministic() to IFunctionBuilder i-face
* A test for non-deterministic mutations
* In MutationsInterpreter::validate() ensure deterministic functions
* Adjusted nondeterministic mutation tests
* Moved around some code in MutationsInterpreter::validate()
* Dropped unnecessary check in findFirstNonDeterministicFuncName()
* Corrections to IFunction{Base,Builder} interface
2019-10-10 17:38:08 +03:00
Nikolai Kochetov
ef14df4632 Added more comments. 2019-10-10 17:16:15 +03:00
millb
350f0b8a1c Merge remote-tracking branch 'origin/url_engine_problem' into url_engine_problem 2019-10-10 16:47:17 +03:00
millb
a00089f0b4 Renamed StorageOfAllowedURL -> RemoteHostFilter 2019-10-10 15:58:06 +03:00
Mikhail Korotov
4710d2184c
Update Context.cpp 2019-10-10 01:24:27 +03:00
millb
a97739f67f Created class StorageOfAllowedURL
Created test for table function remote and remoteSecure
Created check allowed url in remote and remoteSecure
Fixed tests
2019-10-09 23:29:41 +03:00
Alexey Milovidov
b302fec362 Fixed bad code in transformQueryForExternalDatabase 2019-10-09 22:58:50 +03:00
Nikolai Kochetov
9c5ae5f536 Merge branch 'master' into processors-and-storages 2019-10-09 14:12:47 +03:00
alesapin
ef0b2f5936
Merge pull request #7209 from ClickHouse/dictionaries_ddl_parser
Dictionaries ddl parser
2019-10-09 12:51:08 +03:00
alexey-milovidov
5c2d478543
Merge pull request #7212 from ClickHouse/aku/field-includes
Include Field.h and FieldVisitor.h into fewer files.
2019-10-08 22:40:30 +03:00
alexey-milovidov
b9aa5d812d
Merge pull request #7171 from nikvas0/nikvas0/lazy_db
Lazy Database
2019-10-08 22:15:55 +03:00