3232import javax .lang .model .util .Elements ;
3333
3434import static java .util .stream .Collectors .joining ;
35- import static org .elasticsearch .compute .gen .AggregatorImplementer .firstUpper ;
35+ import static org .elasticsearch .compute .gen .AggregatorImplementer .capitalize ;
3636import static org .elasticsearch .compute .gen .AggregatorImplementer .valueBlockType ;
3737import static org .elasticsearch .compute .gen .AggregatorImplementer .valueVectorType ;
3838import static org .elasticsearch .compute .gen .Methods .findMethod ;
@@ -136,7 +136,7 @@ private TypeName choseStateType() {
136136 if (false == initReturn .isPrimitive ()) {
137137 return initReturn ;
138138 }
139- String simpleName = firstUpper (initReturn .toString ());
139+ String simpleName = capitalize (initReturn .toString ());
140140 if (warnExceptions .isEmpty ()) {
141141 return ClassName .get ("org.elasticsearch.compute.aggregation" , simpleName + "ArrayState" );
142142 }
@@ -401,7 +401,7 @@ private MethodSpec addRawInputLoop(TypeName groupsType, TypeName valuesType) {
401401 String arrayType = valueTypeString ();
402402 builder .addStatement ("$L[] valuesArray = new $L[valuesEnd - valuesStart]" , arrayType , arrayType );
403403 builder .beginControlFlow ("for (int v = valuesStart; v < valuesEnd; v++)" );
404- builder .addStatement ("valuesArray[v-valuesStart] = $L.get$L(v)" , "values" , firstUpper (arrayType ));
404+ builder .addStatement ("valuesArray[v-valuesStart] = $L.get$L(v)" , "values" , capitalize (arrayType ));
405405 builder .endControlFlow ();
406406 combineRawInputForArray (builder , "valuesArray" );
407407 } else {
@@ -447,7 +447,7 @@ private void combineRawInputForPrimitive(MethodSpec.Builder builder, String bloc
447447 "state.set(groupId, $T.combine(state.getOrDefault(groupId), $L.get$L($L)))" ,
448448 declarationType ,
449449 blockVariable ,
450- firstUpper (valueTypeName ().toString ()),
450+ capitalize (valueTypeName ().toString ()),
451451 offsetVariable
452452 );
453453 }
@@ -461,13 +461,13 @@ private void combineRawInputForVoid(MethodSpec.Builder builder, String blockVari
461461 "$T.combine(state, groupId, $L.get$L($L))" ,
462462 declarationType ,
463463 blockVariable ,
464- firstUpper (valueTypeName ().toString ()),
464+ capitalize (valueTypeName ().toString ()),
465465 offsetVariable
466466 );
467467 }
468468
469469 private void combineRawInputWithTimestamp (MethodSpec .Builder builder , String offsetVariable ) {
470- String blockType = firstUpper (valueTypeName ().toString ());
470+ String blockType = capitalize (valueTypeName ().toString ());
471471 if (offsetVariable .contains (" + " )) {
472472 builder .addStatement ("var valuePosition = $L" , offsetVariable );
473473 offsetVariable = "valuePosition" ;
0 commit comments