[bugfix](mergeprofile) ignore null profile to avoid bug (#27860)

---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
This commit is contained in:
yiguolei
2023-12-01 16:56:29 +08:00
committed by GitHub
parent 34c85c962f
commit 18338a33b6
2 changed files with 7 additions and 4 deletions

View File

@ -61,10 +61,8 @@ public:
RETURN_IF_ERROR(DataSink::prepare(state));
// Prepare the exprs to run.
RETURN_IF_ERROR(VExpr::prepare(_output_vexpr_ctxs, state, _row_desc));
std::stringstream title;
title << _name << " (frag_id=" << state->fragment_instance_id() << ")";
// create profile
_profile = state->obj_pool()->add(new RuntimeProfile(title.str()));
_profile = state->obj_pool()->add(new RuntimeProfile(_name));
init_sink_common_profile();
return Status::OK();
}

View File

@ -448,7 +448,12 @@ public class RuntimeProfile {
private static List<RuntimeProfile> getChildListFromLists(String profileName, List<RuntimeProfile> profiles) {
List<RuntimeProfile> ret = new ArrayList<RuntimeProfile>();
for (RuntimeProfile profile : profiles) {
ret.add(profile.getChildMap().get(profileName));
RuntimeProfile tmp = profile.getChildMap().get(profileName);
if (tmp != null) {
ret.add(profile.getChildMap().get(profileName));
} else {
LOG.debug("could not find {} from {}", profileName, profile.toString());
}
}
return ret;
}