if (metric.hasLongValue()) { values[metricId] = metric.getLongValue(); } else if (metric.hasDoubleValue()) { Optional<Integer> columnIndex = Optional.ofNullable(metricIdToMetricTableColumnIndex.get(metric.getMetricId())); columnIndex.ifPresent(index -> { if (metric.hasLongValue()) { values[index] = metric.getLongValue(); } else if (metric.hasDoubleValue()) {
private void setSortSpillInfo(CoreOperatorType operatorType, OperatorProfile operatorProfile) { initSpillJobDetails(); final int operatorNumber = operatorType.getNumber(); Preconditions.checkState(operatorNumber == CoreOperatorType.EXTERNAL_SORT_VALUE); final List<UserBitShared.MetricValue> metricValues = operatorProfile.getMetricList(); for (UserBitShared.MetricValue metricValue : metricValues) { final int metricId = metricValue.getMetricId(); if (metricId == ExternalSortOperator.Metric.TOTAL_SPILLED_DATA_SIZE.ordinal() && metricValue.hasLongValue()) { spillJobDetails.setTotalBytesSpilledBySort(spillJobDetails.getTotalBytesSpilledBySort() + metricValue.getLongValue()); } } }
private void setAggSpillInfo(CoreOperatorType operatorType, OperatorProfile operatorProfile) { initSpillJobDetails(); final int operatorNumber = operatorType.getNumber(); Preconditions.checkState(operatorNumber == CoreOperatorType.HASH_AGGREGATE_VALUE); final List<UserBitShared.MetricValue> metricValues = operatorProfile.getMetricList(); for (UserBitShared.MetricValue metricValue : metricValues) { final int metricId = metricValue.getMetricId(); if (metricId == HashAggStats.Metric.TOTAL_SPILLED_DATA_SIZE.ordinal() && metricValue.hasLongValue()) { spillJobDetails.setTotalBytesSpilledByHashAgg(spillJobDetails.getTotalBytesSpilledByHashAgg() + metricValue.getLongValue()); } } }
public Builder mergeFrom(com.dremio.exec.proto.UserBitShared.MetricValue other) { if (other == com.dremio.exec.proto.UserBitShared.MetricValue.getDefaultInstance()) return this; if (other.hasMetricId()) { setMetricId(other.getMetricId()); } if (other.hasLongValue()) { setLongValue(other.getLongValue()); } if (other.hasDoubleValue()) { setDoubleValue(other.getDoubleValue()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public void writeTo(io.protostuff.Output output, com.dremio.exec.proto.UserBitShared.MetricValue message) throws java.io.IOException { if(message.hasMetricId()) output.writeInt32(1, message.getMetricId(), false); if(message.hasLongValue()) output.writeInt64(2, message.getLongValue(), false); if(message.hasDoubleValue()) output.writeDouble(3, message.getDoubleValue(), false); } public boolean isInitialized(com.dremio.exec.proto.UserBitShared.MetricValue message)