Fix testcase

This commit is contained in:
qhsong 2024-07-30 10:23:51 +08:00
parent 52d40350f6
commit 59bd7447fc
7 changed files with 23 additions and 10 deletions

View File

@ -93,7 +93,7 @@ public:
//QueryPlan can not build parallel, but processor may build parallel in expand() function.
//so we use atomic_size_t for processor_count
std::shared_ptr<size_t> step_count = std::make_shared<size_t>(0);
std::shared_ptr<std::atomic_size_t> step_count = std::make_shared<std::atomic_size_t>(0);
std::shared_ptr<std::atomic_size_t> processor_count = std::make_shared<std::atomic_size_t>(0);
QueryIsCanceledPredicate query_is_canceled_predicate = {};

View File

@ -1404,9 +1404,7 @@ private:
std::shared_ptr<Clusters> getClustersImpl(std::lock_guard<std::mutex> & lock) const;
/// Throttling
public:
ThrottlerPtr getReplicatedFetchesThrottler() const;
ThrottlerPtr getReplicatedSendsThrottler() const;

View File

@ -140,7 +140,10 @@ public:
void setProcessorIndex()
{
processor_index = CurrentThread::get().incrProcessorIndex();
if (CurrentThread::isInitialized()) [[likely]]
{
processor_index = CurrentThread::get().incrProcessorIndex();
}
}
virtual String getName() const = 0;

View File

@ -76,7 +76,10 @@ class IQueryPlanStep
public:
IQueryPlanStep()
{
step_index = CurrentThread::get().incrStepIndex();
if (CurrentThread::isInitialized()) [[likely]]
{
step_index = CurrentThread::get().incrStepIndex();
}
}
virtual ~IQueryPlanStep() = default;

View File

@ -29,7 +29,7 @@
Granules: 2/3
-----------------
"Node Type": "ReadFromMergeTree",
"Node Id": "ReadFromMergeTree_0",
"Node Id": "ReadFromMergeTree_1",
"Description": "default.test_index",
"Indexes": [
{
@ -127,7 +127,7 @@
Granules: 3/6
-----------------
"Node Type": "ReadFromMergeTree",
"Node Id": "ReadFromMergeTree_0",
"Node Id": "ReadFromMergeTree_1",
"Description": "default.test_index",
"Indexes": [
{

View File

@ -2,20 +2,25 @@
{
"Plan": {
"Node Type": "Union",
"Node Id": "Union_11",
"Plans": [
{
"Node Type": "Expression",
"Node Id": "Expression_14",
"Plans": [
{
"Node Type": "ReadFromStorage"
"Node Type": "ReadFromStorage",
"Node Id": "ReadFromStorage_1"
}
]
},
{
"Node Type": "Expression",
"Node Id": "Expression_17",
"Plans": [
{
"Node Type": "ReadFromStorage"
"Node Type": "ReadFromStorage",
"Node Id": "ReadFromStorage_5"
}
]
}
@ -35,6 +40,7 @@
}
--------
"Node Type": "Aggregating",
"Node Id": "Aggregating_4",
"Header": [
{
"Name": "__table1.number",
@ -73,13 +79,16 @@
],
--------
"Node Type": "ArrayJoin",
"Node Id": "ArrayJoin_5",
"Left": false,
"Columns": ["__table1.x", "__table1.y"],
--------
"Node Type": "Distinct",
"Node Id": "Distinct_5",
"Columns": ["intDiv(__table1.number, 2_UInt8)", "intDiv(__table1.number, 3_UInt8)"],
--
"Node Type": "Distinct",
"Node Id": "Distinct_4",
"Columns": ["intDiv(__table1.number, 2_UInt8)", "intDiv(__table1.number, 3_UInt8)"],
--------
"Sort Description": [

View File

@ -1 +1 @@
['digraph','{',' rankdir="LR";',' { node [shape = rect]',' n1 [label="Remote"];',' }','}','digraph','{',' rankdir="LR";',' { node [shape = rect]',' n1 [label="Remote"];',' }','}']
['digraph','{',' rankdir="LR";',' { node [shape = rect]',' n1 [label="Remote_4"];',' }','}','digraph','{',' rankdir="LR";',' { node [shape = rect]',' n1 [label="Remote_4"];',' }','}']