Skip to content

Commit

Permalink
profile bhj
Browse files Browse the repository at this point in the history
  • Loading branch information
zzcclp committed Sep 19, 2024
1 parent 986d8d0 commit a211e23
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cpp-ch/local-engine/Parser/RelParsers/JoinRelParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ void JoinRelParser::renamePlanColumns(DB::QueryPlan & left, DB::QueryPlan & righ

DB::QueryPlanPtr JoinRelParser::parseJoin(const substrait::JoinRel & join, DB::QueryPlanPtr left, DB::QueryPlanPtr right)
{
Stopwatch watch(CLOCK_MONOTONIC);
auto join_config = JoinConfig::loadFromContext(getContext());
google::protobuf::StringValue optimization_info;
optimization_info.ParseFromString(join.advanced_extension().optimization().value());
Expand Down Expand Up @@ -315,6 +316,8 @@ DB::QueryPlanPtr JoinRelParser::parseJoin(const substrait::JoinRel & join, DB::Q
query_plan = std::move(left);
/// hold right plan for profile
extra_plan_holder.emplace_back(std::move(right));
std::cout << "parse bhj time: " << join_opt_info.storage_join_key << "---" << watch.elapsedMicroseconds() / 1000.0 << std::endl;
watch.stop();
}
else if (join_opt_info.is_smj)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ class GlutenWholeStageColumnarRDD(
_ =>
ExecutorManager.tryTaskSet(numaBindingInfo)
val (inputPartition, inputColumnarRDDPartitions) = castNativePartition(split)
var st = System.nanoTime()
val inputIterators = rdds.getIterators(inputColumnarRDDPartitions, context)
BackendsApiManager.getIteratorApiInstance.genFirstStageIterator(
logWarning(s"${split.index} rdds get iterators: ${System.nanoTime() - st}")
st = System.nanoTime()
val gen = BackendsApiManager.getIteratorApiInstance.genFirstStageIterator(
inputPartition,
context,
pipelineTime,
Expand All @@ -87,6 +90,8 @@ class GlutenWholeStageColumnarRDD(
split.index,
inputIterators
)
logWarning(s"${split.index} gen iterators: ${System.nanoTime() - st}")
gen
}
}

Expand Down

0 comments on commit a211e23

Please sign in to comment.