Maksim Kita
cfd3421e4f
Dictionary PRIMARY KEY parsing fix
2022-01-29 15:50:10 +00:00
Maksim Kita
f3453024ff
Merge pull request #34060 from amosbird/optimizetupleorderby
...
Make ORDER BY tuple almost as fast as ORDER BY columns
2022-01-29 15:58:09 +01:00
Maksim Kita
8029d79280
Merge pull request #34126 from azat/field-vector-reserve
...
Slightly optimize Array/Tuple/Map
2022-01-29 14:25:39 +01:00
Maksim Kita
0217c0d7d8
Merge pull request #34116 from ramazanpolat/master
...
Make clickhouse-diagnostics also work for altinity release
2022-01-29 14:25:29 +01:00
Maksim Kita
d0f9412072
Merge pull request #34136 from cnmade/PF202201291630
...
translate zh...statements/exists
2022-01-29 14:25:09 +01:00
Amos Bird
04cff632db
Revise
2022-01-29 20:55:52 +08:00
Maksim Kita
76067efbef
Merge pull request #34076 from bigo-sg/poolbase
...
Add expire() in PoolBase
2022-01-29 13:51:55 +01:00
mergify[bot]
ce8373c7a1
Merge branch 'master' into master
2022-01-29 11:24:05 +00:00
Azat Khuzhin
d37ebda2d2
Tiny cleanup in SerializationTuple
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-29 12:35:32 +03:00
Azat Khuzhin
9766619b55
Headers cleanup in ColumnMap
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-29 12:32:25 +03:00
Azat Khuzhin
f88ab143c4
Headers cleanup in ColumnArray
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-29 12:32:15 +03:00
Azat Khuzhin
3bc10871eb
Minor cleanup in ColumnTuple
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-29 12:30:31 +03:00
Azat Khuzhin
b511abb72c
Use reserve() over resize() for Map
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-29 12:29:13 +03:00
Azat Khuzhin
9e740eb9d0
Use reserve() over resize() for Tuple
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-29 12:29:13 +03:00
Azat Khuzhin
097bd6b7e8
Simplify ColumnArray::operator[] using ColumnArray::get()
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-29 12:28:32 +03:00
Azat Khuzhin
06318ebed5
SerializationArray: Use reserve() over resize()
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-29 12:28:32 +03:00
cnmade
4c2b3f73da
Fixed zh...statements/exists: remove bak file
2022-01-29 16:38:12 +08:00
cnmade
242a39d475
Fixed zh...statements/exists: translate to zh
2022-01-29 16:37:45 +08:00
cnmade
36b58881cc
Fixed zh...statements/exists: reimport file
2022-01-29 16:36:03 +08:00
cnmade
47c123de3c
Fixed zh...statements/exists: rename old file
2022-01-29 16:35:18 +08:00
lgbo-ustc
5f1969c6c5
fixed code styles
2022-01-29 09:46:00 +08:00
Maksim Kita
aff7bc3e31
Merge pull request #34049 from cnmade/PF202201271450
...
Translate zh/sql-reference/statements/use: fix last bug of the translate
2022-01-28 23:47:48 +01:00
Anton Popov
b950a12cb3
Merge pull request #34068 from CurtizJ/fix-async-insert-native
...
Fix asynchronous inserts with `Native` format
2022-01-29 01:24:53 +03:00
Anton Popov
7c3d6f5fda
Update 02187_async_inserts_all_formats.sh
2022-01-29 01:24:30 +03:00
alexey-milovidov
379f8d3d7e
Update use.md
2022-01-29 01:09:46 +03:00
alexey-milovidov
6535b75322
Merge pull request #34001 from azat/memory-tracker-fix
...
Fix memory accounting for queries that uses < max_untracker_memory
2022-01-29 00:59:53 +03:00
Amos Bird
2b3ce910c6
Fix collation check
2022-01-29 04:49:58 +08:00
Maksim Kita
7ef2f82707
Merge pull request #34128 from fedrod/subqueries-visitor-missing-static-const
...
ExecuteScalarSubqueriesVisitor missing static const
2022-01-28 21:36:53 +01:00
Federico Rodriguez
c0a5bd187a
ExecuteScalarSubqueriesVisitor missing static const
...
Added string_view
2022-01-28 15:00:04 -05:00
Amos Bird
09a3ab79b7
Fix all const
2022-01-29 01:37:39 +08:00
Ramazan Polat
66cb64393b
Make clickhouse-diagnostics also work for altinity release
...
Because altinity release has `altinitystable` at the end of version number, `parse_version` function throws parse error.
2022-01-28 18:57:56 +03:00
Maksim Kita
b618febdec
Merge pull request #33970 from amosbird/fixwerror
...
Fix missing -Werror flag
2022-01-28 16:53:09 +01:00
Maksim Kita
0465d6b15c
Merge pull request #34079 from cnmade/PF202201281523
...
translate zh...statements/set
2022-01-28 16:10:03 +01:00
Maksim Kita
e2de0dff8f
Merge pull request #34074 from azat/array-optimization
...
Slightly optimize ColumnArray::get()/operator[] (by using reserve over resize)
2022-01-28 16:09:44 +01:00
Maksim Kita
60129aaecb
Merge pull request #34052 from kitaisreal/remove-decimal-padded-pod-array
...
Remove DecimalPaddedPODArray
2022-01-28 15:54:41 +01:00
Sergei Trifonov
6d55a685cd
Merge pull request #34112 from ClickHouse/add-cppexpr-examples
...
add c++expr script examples
2022-01-28 17:27:35 +03:00
Sergei Trifonov
5295adb83d
add c++expr script examples
2022-01-28 16:43:25 +03:00
Azat Khuzhin
0e1c6b6b9c
Make 01810_max_part_removal_threads_long more accurate
...
v0: After parts removing stop attach/detach for each remove, there are only
11 threads, primary query and 10 for removal.
CI: https://s3.amazonaws.com/clickhouse-test-reports/34001/8cace291d17fa9553a98b2a1e8bf15b30fe5a1bd/stateless_tests__debug__actions__[3/3].html
v2: Make 01810_max_part_removal_threads_long more deterministic
Sometimes, if removing parts will be too fast (like in [1]), then it may
use less threads, since thread pool will reuse existing, so increase
number of rows per part and compare threads directly w/o throwIf().
[1]: https://s3.amazonaws.com/clickhouse-test-reports/34001/e74b6379a58c4607bdb54cd4c457410166e869ca/stateless_tests_flaky_check__address__actions_.html
v3: Less flaky 01810_max_part_removal_threads_long
v4: Make check not strict in 01810_max_part_removal_threads_long
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-28 16:25:33 +03:00
Azat Khuzhin
162f96f8e1
Get back detachQueryIfNotDetached() into ExternalLoader
...
ExternalLoader from ThreadPool (async loading) is done from the server
context, not from the query context, and the context will already go
away, so we should detachQueryIfNotDetached() to avoid trigger assertion
in ThreadStatus.
CI: https://s3.amazonaws.com/clickhouse-test-reports/34001/8cace291d17fa9553a98b2a1e8bf15b30fe5a1bd/stateless_tests__debug__actions__[3/3].html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-28 16:25:33 +03:00
Azat Khuzhin
1519985c98
Fix possible "Can't attach query to the thread, it is already attached"
...
After detachQueryIfNotDetached() had been removed it is not enough to
use attachTo() for ThreadPool (scheduleOrThrowOnError()) since the query
may be already attached, if the thread doing multiple jobs, so
CurrentThread::attachToIfDetached() should be used instead.
This should fix all the places from the failures on CI [1]:
$ fgrep DB::CurrentThread::attachTo -A1 ~/Downloads/47.txt | fgrep -v attachTo | cut -d' ' -f5,6 | sort | uniq -c
92 --
2 /fasttest-workspace/build/../../ClickHouse/contrib/libcxx/include/deque:1393: DB::ParallelParsingInputFormat::parserThreadFunction(std::__1::shared_ptr<DB::ThreadGroupStatus>,
4 /fasttest-workspace/build/../../ClickHouse/src/Storages/MergeTree/MergeTreeData.cpp:1595: void
87 /fasttest-workspace/build/../../ClickHouse/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp:993: void
[1]: https://github.com/ClickHouse/ClickHouse/runs/4954466034?check_suite_focus=true
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-28 16:25:33 +03:00
Azat Khuzhin
b0c862c297
Fix memory accounting for queries that uses < max_untracker_memory
...
MemoryTracker starts accounting memory directly only after per-thread
allocation exceeded max_untracker_memory (or memory_profiler_step).
But even memory under this limit should be accounted too, and there is
code to do this in ThreadStatus dtor, however due to
PullingAsyncPipelineExecutor detached the query from thread group that
memory was not accounted.
So remove CurrentThread::detachQueryIfNotDetached() from threads that
uses ThreadFromGlobalPool since it has ThreadStatus, and the query will
be detached using CurrentThread::defaultThreadDeleter.
Note, that before this patch memory accounting works for HTTP queries
due to it had been accounted from ParallelFormattingOutputFormat, but
not for TCP.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-28 16:25:33 +03:00
tavplubix
277fe4e1c4
Merge pull request #34090 from ClickHouse/tavplubix-patch-1
...
Fix builds
2022-01-28 13:41:02 +03:00
tavplubix
b92958815a
Update LineReader.cpp
2022-01-28 13:38:36 +03:00
lgbo-ustc
c576393143
fixed code styles
2022-01-28 18:34:54 +08:00
alexey-milovidov
f6684dbc62
Merge pull request #32304 from devcrafter/deduplication_token_7461
...
insert_deduplication_token setting for INSERT statement
2022-01-28 13:03:55 +03:00
Vitaly Baranov
484743edff
Merge pull request #33201 from azat/client-interactive-suggest
...
Client interactive suggest (extract info from CREATE queries)
2022-01-28 16:30:16 +07:00
Kruglov Pavel
842de427d8
Merge pull request #33984 from Avogar/fix-orc
...
Fix segfault while parsing corrupted ORC file
2022-01-28 12:03:38 +03:00
Kruglov Pavel
efa8775ea6
Merge pull request #33960 from Avogar/autodetect-format
...
Detect format and schema from stdin in clickhouse-local
2022-01-28 12:02:15 +03:00
lgbo-ustc
f5ffdaac21
fixed code styles
2022-01-28 16:55:17 +08:00
Nikolai Kochetov
94999e86c2
Merge pull request #33392 from azat/_shard_num
...
Replace old _shard_num implementation with shardNum() function
2022-01-28 11:02:19 +03:00