Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions internal/core/src/exec/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,49 +59,49 @@ DriverFactory::CreateDriver(std::unique_ptr<DriverContext> ctx,
if (auto filterbitsnode =
std::dynamic_pointer_cast<const plan::FilterBitsNode>(
plannode)) {
tracer::AddEvent("create_operator: FilterBitsNode");
// tracer::AddEvent("create_operator: FilterBitsNode");
operators.push_back(std::make_unique<PhyFilterBitsNode>(
id, ctx.get(), filterbitsnode));
} else if (auto filternode =
std::dynamic_pointer_cast<const plan::FilterNode>(
plannode)) {
tracer::AddEvent("create_operator: FilterNode");
// tracer::AddEvent("create_operator: FilterNode");
operators.push_back(std::make_unique<PhyIterativeFilterNode>(
id, ctx.get(), filternode));
} else if (auto mvccnode =
std::dynamic_pointer_cast<const plan::MvccNode>(
plannode)) {
tracer::AddEvent("create_operator: MvccNode");
// tracer::AddEvent("create_operator: MvccNode");
operators.push_back(
std::make_unique<PhyMvccNode>(id, ctx.get(), mvccnode));
} else if (auto countnode =
std::dynamic_pointer_cast<const plan::CountNode>(
plannode)) {
tracer::AddEvent("create_operator: CountNode");
// tracer::AddEvent("create_operator: CountNode");
operators.push_back(
std::make_unique<PhyCountNode>(id, ctx.get(), countnode));
} else if (auto vectorsearchnode =
std::dynamic_pointer_cast<const plan::VectorSearchNode>(
plannode)) {
tracer::AddEvent("create_operator: VectorSearchNode");
// tracer::AddEvent("create_operator: VectorSearchNode");
operators.push_back(std::make_unique<PhyVectorSearchNode>(
id, ctx.get(), vectorsearchnode));
} else if (auto groupbynode =
std::dynamic_pointer_cast<const plan::GroupByNode>(
plannode)) {
tracer::AddEvent("create_operator: GroupByNode");
// tracer::AddEvent("create_operator: GroupByNode");
operators.push_back(
std::make_unique<PhyGroupByNode>(id, ctx.get(), groupbynode));
} else if (auto samplenode =
std::dynamic_pointer_cast<const plan::RandomSampleNode>(
plannode)) {
tracer::AddEvent("create_operator: RandomSampleNode");
// tracer::AddEvent("create_operator: RandomSampleNode");
operators.push_back(std::make_unique<PhyRandomSampleNode>(
id, ctx.get(), samplenode));
} else if (auto rescoresnode =
std::dynamic_pointer_cast<const plan::RescoresNode>(
plannode)) {
tracer::AddEvent("create_operator: RescoresNode");
// tracer::AddEvent("create_operator: RescoresNode");
operators.push_back(
std::make_unique<PhyRescoresNode>(id, ctx.get(), rescoresnode));
}
Expand Down
18 changes: 9 additions & 9 deletions internal/core/src/exec/Task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Task::Next(ContinueFuture* future) {
AssertInfo(state_ == TaskState::kRunning,
"Task has already finished processing.");

tracer::AutoSpan span("Task::Next", tracer::GetRootSpan(), true);
// tracer::AutoSpan span("Task::Next", tracer::GetRootSpan(), true);
if (driver_factories_.empty()) {
AssertInfo(
consumer_supplier_ == nullptr,
Expand Down Expand Up @@ -201,15 +201,15 @@ Task::Next(ContinueFuture* future) {
auto result = drivers_[i]->Next(blocking_state);

if (result) {
tracer::AddEvent(
fmt::format("driver_result_produced: driver_id={}, rows={}",
i,
result->childrens()[0]->size()));
// tracer::AddEvent(
// fmt::format("driver_result_produced: driver_id={}, rows={}",
// i,
// result->childrens()[0]->size()));
return result;
}

if (blocking_state) {
tracer::AddEvent(fmt::format("driver_{}_blocked", i));
// tracer::AddEvent(fmt::format("driver_{}_blocked", i));
futures[i] = blocking_state->future();
}

Expand All @@ -218,9 +218,9 @@ Task::Next(ContinueFuture* future) {
}
}

tracer::AddEvent(fmt::format("iteration: runnable={}, blocked={}",
runnable_drivers,
blocked_drivers));
// tracer::AddEvent(fmt::format("iteration: runnable={}, blocked={}",
// runnable_drivers,
// blocked_drivers));

if (runnable_drivers == 0) {
if (blocked_drivers > 0) {
Expand Down
10 changes: 5 additions & 5 deletions internal/core/src/exec/expression/BinaryArithOpEvalRangeExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ namespace exec {

void
PhyBinaryArithOpEvalRangeExpr::Eval(EvalCtx& context, VectorPtr& result) {
tracer::AutoSpan span(
"PhyBinaryArithOpEvalRangeExpr::Eval", tracer::GetRootSpan(), true);
span.GetSpan()->SetAttribute("data_type",
static_cast<int>(expr_->column_.data_type_));
span.GetSpan()->SetAttribute("op_type", static_cast<int>(expr_->op_type_));
// tracer::AutoSpan span(
// "PhyBinaryArithOpEvalRangeExpr::Eval", tracer::GetRootSpan(), true);
// span.GetSpan()->SetAttribute("data_type",
// static_cast<int>(expr_->column_.data_type_));
// span.GetSpan()->SetAttribute("op_type", static_cast<int>(expr_->op_type_));

auto input = context.get_offset_input();
SetHasOffsetInput((input != nullptr));
Expand Down
8 changes: 4 additions & 4 deletions internal/core/src/exec/expression/BinaryRangeExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ namespace exec {

void
PhyBinaryRangeFilterExpr::Eval(EvalCtx& context, VectorPtr& result) {
tracer::AutoSpan span(
"PhyBinaryRangeFilterExpr::Eval", tracer::GetRootSpan(), true);
span.GetSpan()->SetAttribute("data_type",
static_cast<int>(expr_->column_.data_type_));
// tracer::AutoSpan span(
// "PhyBinaryRangeFilterExpr::Eval", tracer::GetRootSpan(), true);
// span.GetSpan()->SetAttribute("data_type",
// static_cast<int>(expr_->column_.data_type_));

auto input = context.get_offset_input();
SetHasOffsetInput((input != nullptr));
Expand Down
4 changes: 2 additions & 2 deletions internal/core/src/exec/expression/CallExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ namespace exec {

void
PhyCallExpr::Eval(EvalCtx& context, VectorPtr& result) {
tracer::AutoSpan span("PhyCallExpr::Eval", tracer::GetRootSpan(), true);
span.GetSpan()->SetAttribute("function_name", expr_->fun_name());
// tracer::AutoSpan span("PhyCallExpr::Eval", tracer::GetRootSpan(), true);
// span.GetSpan()->SetAttribute("function_name", expr_->fun_name());

auto offset_input = context.get_offset_input();
SetHasOffsetInput(offset_input != nullptr);
Expand Down
4 changes: 2 additions & 2 deletions internal/core/src/exec/expression/ColumnExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ PhyColumnExpr::GetNextBatchSize() {

void
PhyColumnExpr::Eval(EvalCtx& context, VectorPtr& result) {
tracer::AutoSpan span("PhyColumnExpr::Eval", tracer::GetRootSpan(), true);
span.GetSpan()->SetAttribute("data_type", static_cast<int>(expr_->type()));
// tracer::AutoSpan span("PhyColumnExpr::Eval", tracer::GetRootSpan(), true);
// span.GetSpan()->SetAttribute("data_type", static_cast<int>(expr_->type()));

auto input = context.get_offset_input();
SetHasOffsetInput(input != nullptr);
Expand Down
10 changes: 5 additions & 5 deletions internal/core/src/exec/expression/CompareExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ PhyCompareFilterExpr::ExecCompareExprDispatcher(OpType op, EvalCtx& context) {

void
PhyCompareFilterExpr::Eval(EvalCtx& context, VectorPtr& result) {
tracer::AutoSpan span(
"PhyCompareFilterExpr::Eval", tracer::GetRootSpan(), true);
span.GetSpan()->SetAttribute("op_type", static_cast<int>(expr_->op_type_));
span.GetSpan()->SetAttribute("left_indexed", is_left_indexed_);
span.GetSpan()->SetAttribute("right_indexed", is_right_indexed_);
// tracer::AutoSpan span(
// "PhyCompareFilterExpr::Eval", tracer::GetRootSpan(), true);
// span.GetSpan()->SetAttribute("op_type", static_cast<int>(expr_->op_type_));
// span.GetSpan()->SetAttribute("left_indexed", is_left_indexed_);
// span.GetSpan()->SetAttribute("right_indexed", is_right_indexed_);

auto input = context.get_offset_input();
SetHasOffsetInput((input != nullptr));
Expand Down
6 changes: 3 additions & 3 deletions internal/core/src/exec/expression/ConjunctExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ PhyConjunctFilterExpr::SkipFollowingExprs(int start) {

void
PhyConjunctFilterExpr::Eval(EvalCtx& context, VectorPtr& result) {
tracer::AutoSpan span(
"PhyConjunctFilterExpr::Eval", tracer::GetRootSpan(), true);
span.GetSpan()->SetAttribute("is_and", is_and_);
// tracer::AutoSpan span(
// "PhyConjunctFilterExpr::Eval", tracer::GetRootSpan(), true);
// span.GetSpan()->SetAttribute("is_and", is_and_);

if (input_order_.empty()) {
input_order_.resize(inputs_.size());
Expand Down
8 changes: 4 additions & 4 deletions internal/core/src/exec/expression/ExistsExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ namespace exec {

void
PhyExistsFilterExpr::Eval(EvalCtx& context, VectorPtr& result) {
tracer::AutoSpan span(
"PhyExistsFilterExpr::Eval", tracer::GetRootSpan(), true);
span.GetSpan()->SetAttribute("data_type",
static_cast<int>(expr_->column_.data_type_));
// tracer::AutoSpan span(
// "PhyExistsFilterExpr::Eval", tracer::GetRootSpan(), true);
// span.GetSpan()->SetAttribute("data_type",
// static_cast<int>(expr_->column_.data_type_));

context.set_apply_valid_data_after_flip(false);
auto input = context.get_offset_input();
Expand Down
2 changes: 1 addition & 1 deletion internal/core/src/exec/expression/Expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ExprSet::Eval(int32_t begin,
bool initialize,
EvalCtx& context,
std::vector<VectorPtr>& results) {
tracer::AutoSpan span("ExprSet::Eval", tracer::GetRootSpan(), true);
// tracer::AutoSpan span("ExprSet::Eval", tracer::GetRootSpan(), true);

results.resize(exprs_.size());
auto* exec_ctx = context.get_exec_context();
Expand Down
8 changes: 4 additions & 4 deletions internal/core/src/exec/expression/JsonContainsExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ namespace exec {

void
PhyJsonContainsFilterExpr::Eval(EvalCtx& context, VectorPtr& result) {
tracer::AutoSpan span(
"PhyJsonContainsFilterExpr::Eval", tracer::GetRootSpan(), true);
span.GetSpan()->SetAttribute("data_type",
static_cast<int>(expr_->column_.data_type_));
// tracer::AutoSpan span(
// "PhyJsonContainsFilterExpr::Eval", tracer::GetRootSpan(), true);
// span.GetSpan()->SetAttribute("data_type",
// static_cast<int>(expr_->column_.data_type_));

auto input = context.get_offset_input();
SetHasOffsetInput((input != nullptr));
Expand Down
2 changes: 1 addition & 1 deletion internal/core/src/exec/expression/LogicalBinaryExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace exec {

void
PhyLogicalBinaryExpr::Eval(EvalCtx& context, VectorPtr& result) {
tracer::AutoSpan span("PhyLogicalBinaryExpr::Eval", tracer::GetRootSpan());
// tracer::AutoSpan span("PhyLogicalBinaryExpr::Eval", tracer::GetRootSpan());

AssertInfo(
inputs_.size() == 2,
Expand Down
2 changes: 1 addition & 1 deletion internal/core/src/exec/expression/LogicalUnaryExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace exec {

void
PhyLogicalUnaryExpr::Eval(EvalCtx& context, VectorPtr& result) {
tracer::AutoSpan span("PhyLogicalUnaryExpr::Eval", tracer::GetRootSpan());
// tracer::AutoSpan span("PhyLogicalUnaryExpr::Eval", tracer::GetRootSpan());

AssertInfo(inputs_.size() == 1,
"logical unary expr must has one input, but now {}",
Expand Down
6 changes: 3 additions & 3 deletions internal/core/src/exec/expression/NullExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ namespace exec {

void
PhyNullExpr::Eval(EvalCtx& context, VectorPtr& result) {
tracer::AutoSpan span("PhyNullExpr::Eval", tracer::GetRootSpan(), true);
span.GetSpan()->SetAttribute("data_type",
static_cast<int>(expr_->column_.data_type_));
// tracer::AutoSpan span("PhyNullExpr::Eval", tracer::GetRootSpan(), true);
// span.GetSpan()->SetAttribute("data_type",
// static_cast<int>(expr_->column_.data_type_));

auto input = context.get_offset_input();
switch (expr_->column_.data_type_) {
Expand Down
8 changes: 4 additions & 4 deletions internal/core/src/exec/expression/TermExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ namespace exec {

void
PhyTermFilterExpr::Eval(EvalCtx& context, VectorPtr& result) {
tracer::AutoSpan span(
"PhyTermFilterExpr::Eval", tracer::GetRootSpan(), true);
span.GetSpan()->SetAttribute("data_type",
static_cast<int>(expr_->column_.data_type_));
// tracer::AutoSpan span(
// "PhyTermFilterExpr::Eval", tracer::GetRootSpan(), true);
// span.GetSpan()->SetAttribute("data_type",
// static_cast<int>(expr_->column_.data_type_));

auto input = context.get_offset_input();
SetHasOffsetInput((input != nullptr));
Expand Down
10 changes: 5 additions & 5 deletions internal/core/src/exec/expression/UnaryExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ PhyUnaryRangeFilterExpr::ExecRangeVisitorImplArrayForIndex<proto::plan::Array>(

void
PhyUnaryRangeFilterExpr::Eval(EvalCtx& context, VectorPtr& result) {
tracer::AutoSpan span(
"PhyUnaryRangeFilterExpr::Eval", tracer::GetRootSpan(), true);
span.GetSpan()->SetAttribute("data_type",
static_cast<int>(expr_->column_.data_type_));
span.GetSpan()->SetAttribute("op_type", static_cast<int>(expr_->op_type_));
// tracer::AutoSpan span(
// "PhyUnaryRangeFilterExpr::Eval", tracer::GetRootSpan(), true);
// span.GetSpan()->SetAttribute("data_type",
// static_cast<int>(expr_->column_.data_type_));
// span.GetSpan()->SetAttribute("op_type", static_cast<int>(expr_->op_type_));

auto input = context.get_offset_input();
SetHasOffsetInput((input != nullptr));
Expand Down
4 changes: 2 additions & 2 deletions internal/core/src/exec/expression/ValueExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ namespace exec {

void
PhyValueExpr::Eval(EvalCtx& context, VectorPtr& result) {
tracer::AutoSpan span("PhyValueExpr::Eval", tracer::GetRootSpan(), true);
span.GetSpan()->SetAttribute("data_type", static_cast<int>(expr_->type()));
// tracer::AutoSpan span("PhyValueExpr::Eval", tracer::GetRootSpan(), true);
// span.GetSpan()->SetAttribute("data_type", static_cast<int>(expr_->type()));

auto input = context.get_offset_input();
SetHasOffsetInput((input != nullptr));
Expand Down
4 changes: 2 additions & 2 deletions internal/core/src/exec/operator/CountNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ PhyCountNode::GetOutput() {
if (is_finished_ || !no_more_input_) {
return nullptr;
}
tracer::AutoSpan span("PhyCountNode::Execute", tracer::GetRootSpan(), true);
// tracer::AutoSpan span("PhyCountNode::Execute", tracer::GetRootSpan(), true);
auto col_input = GetColumnVector(input_);
TargetBitmapView view(col_input->GetRawData(), col_input->size());
auto cnt = view.size() - view.count();
query_context_->set_retrieve_result(
std::move(*(wrap_num_entities(cnt, view.size()))));
is_finished_ = true;

tracer::AddEvent(fmt::format("count_result: {}", cnt));
// tracer::AddEvent(fmt::format("count_result: {}", cnt));
return input_;
}

Expand Down
6 changes: 3 additions & 3 deletions internal/core/src/exec/operator/FilterBitsNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ PhyFilterBitsNode::GetOutput() {
return nullptr;
}

tracer::AutoSpan span(
"PhyFilterBitsNode::Execute", tracer::GetRootSpan(), true);
tracer::AddEvent(fmt::format("input_rows: {}", need_process_rows_));
// tracer::AutoSpan span(
// "PhyFilterBitsNode::Execute", tracer::GetRootSpan(), true);
// tracer::AddEvent(fmt::format("input_rows: {}", need_process_rows_));

std::chrono::high_resolution_clock::time_point scalar_start =
std::chrono::high_resolution_clock::now();
Expand Down
10 changes: 5 additions & 5 deletions internal/core/src/exec/operator/GroupByNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ PhyGroupByNode::GetOutput() {
return nullptr;
}

tracer::AutoSpan span(
"PhyGroupByNode::Execute", tracer::GetRootSpan(), true);
// tracer::AutoSpan span(
// "PhyGroupByNode::Execute", tracer::GetRootSpan(), true);

DeferLambda([&]() { is_finished_ = true; });
if (input_ == nullptr) {
return nullptr;
}

tracer::AddEvent(fmt::format("group_size: {}", search_info_.group_size_));
// tracer::AddEvent(fmt::format("group_size: {}", search_info_.group_size_));

std::chrono::high_resolution_clock::time_point vector_start =
std::chrono::high_resolution_clock::now();
Expand Down Expand Up @@ -89,8 +89,8 @@ PhyGroupByNode::GetOutput() {
search_result.group_by_values_.value().size(),
search_result.seg_offsets_.size());
}
tracer::AddEvent(
fmt::format("grouped_results: {}", search_result.seg_offsets_.size()));
// tracer::AddEvent(
// fmt::format("grouped_results: {}", search_result.seg_offsets_.size()));

query_context_->set_search_result(std::move(search_result));
std::chrono::high_resolution_clock::time_point vector_end =
Expand Down
10 changes: 5 additions & 5 deletions internal/core/src/exec/operator/IterativeFilterNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ PhyIterativeFilterNode::GetOutput() {
return nullptr;
}

tracer::AutoSpan span(
"PhyIterativeFilterNode::Execute", tracer::GetRootSpan(), true);
// tracer::AutoSpan span(
// "PhyIterativeFilterNode::Execute", tracer::GetRootSpan(), true);

DeferLambda([&]() { is_finished_ = true; });

Expand Down Expand Up @@ -274,9 +274,9 @@ PhyIterativeFilterNode::GetOutput() {
scalar_cost / 1000);

if (!is_native_supported_) {
tracer::AddEvent(fmt::format("total_processed: {}, matched: {}",
need_process_rows_,
need_process_rows_ - bitset.count()));
// tracer::AddEvent(fmt::format("total_processed: {}, matched: {}",
// need_process_rows_,
// need_process_rows_ - bitset.count()));
}

return input_;
Expand Down
Loading
Loading