Commit Graph

82264 Commits

Author SHA1 Message Date
Maksim Kita
1eacd7a00c pdqsort performance check 2022-01-29 21:47:32 +00:00
Maksim Kita
a5fc8289ae
Merge pull request #34141 from kitaisreal/parser-dictionary-primary-key-fix
Dictionary PRIMARY KEY parsing fix
2022-01-29 19:55:32 +01:00
Maksim Kita
6319d47a7f
Merge pull request #34143 from kitaisreal/sort-block-refactoring
Sort block refactoring
2022-01-29 19:47:49 +01:00
Maksim Kita
fc8e2a1f09
Merge pull request #34054 from dongcheolpark/dongcheolpark-doc-korean
Translate ko/index.md : add translate
2022-01-29 17:45:32 +01:00
Maksim Kita
a242610e28
Merge pull request #34050 from cnmade/PF202201271531
Fixed zh...statements/alter
2022-01-29 17:09:51 +01:00
Maksim Kita
2260bcea6a
Update index.md 2022-01-29 17:09:28 +01:00
Maksim Kita
ca2e652f8b
Merge pull request #33986 from Tiaonmmn/patch-6
Update requirements.md
2022-01-29 16:57:59 +01:00
Maksim Kita
9c91a50050 Sort block refactoring 2022-01-29 15:50:55 +00:00
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