a.error("単純集計演算子の戻り値型は最初の引数の集計結果を表す型である必要があります");
return null;
}
ShuffleKey key = summarized.getSummarizeKey();
Summarize annotation = context.element.getAnnotation(Summarize.class);
if (annotation == null) {
a.error("注釈の解釈に失敗しました");
return null;
}
OperatorProcessorUtil.checkPortName(a, new String[] {
annotation.summarizedPort(),
});
if (a.hasError()) {
return null;
}
Builder builder = new Builder(getTargetAnnotationType(), context);
builder.addAttribute(FlowBoundary.SHUFFLE);
builder.addAttribute(a.getObservationCount());
builder.addAttribute(annotation.partialAggregation());
builder.setDocumentation(a.getExecutableDocument());
builder.addInput(
a.getParameterDocument(0),
a.getParameterName(0),
a.getParameterType(0).getType(),
0,
key);
builder.addOutput(
a.getReturnDocument(),
annotation.summarizedPort(),
a.getReturnType().getType(),
null,
null);
return builder.toDescriptor();
}