MCPcopy Create free account
hub / github.com/apache/impala / sum

Method sum

fe/src/main/java/org/apache/impala/planner/CoreCount.java:116–130  ·  view source on GitHub ↗
(List<CoreCount> cores)

Source from the content-addressed store, hash-verified

114 }
115
116 protected static CoreCount sum(List<CoreCount> cores) {
117 ImmutableList.Builder<Id> idBuilder = new ImmutableList.Builder<Id>();
118 ImmutableList.Builder<Integer> countBuilder = new ImmutableList.Builder<Integer>();
119 ImmutableSet.Builder<PlanFragmentId> fragmentIdBuilder =
120 new ImmutableSet.Builder<PlanFragmentId>();
121 boolean hasPlanRootSink = false;
122 for (CoreCount coreRequirement : cores) {
123 idBuilder.addAll(coreRequirement.ids_);
124 countBuilder.addAll(coreRequirement.counts_);
125 fragmentIdBuilder.addAll(coreRequirement.uniqueFragmentIds_);
126 hasPlanRootSink |= coreRequirement.hasPlanRootSink_;
127 }
128 return new CoreCount(idBuilder.build(), countBuilder.build(),
129 fragmentIdBuilder.build(), hasPlanRootSink);
130 }
131
132 protected static CoreCount sum(CoreCount core1, CoreCount core2) {
133 return sum(ImmutableList.of(core1, core2));

Callers 15

nFunction · 0.45
getNumInputRowsMethod · 0.45
CoreCountMethod · 0.45
estimateAvgRowSizeMethod · 0.45
sumValuesMethod · 0.45

Calls 3

buildMethod · 0.95
addAllMethod · 0.80
ofMethod · 0.45

Tested by 1