Skip to content

Commit

Permalink
[Minor] Fix Variable initialization (#602)
Browse files Browse the repository at this point in the history
* Fix Variable intilaliztion

* Inline fieldSchema variable
  • Loading branch information
satybald authored and dguy committed Jan 19, 2018
1 parent 09c5da7 commit 43b2037
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,15 +350,13 @@ private Schema buildAggregateSchema(final Schema schema,
}
for (int aggFunctionVarSuffix = 0;
aggFunctionVarSuffix < getFunctionList().size(); aggFunctionVarSuffix++) {
Schema fieldSchema;
String udafName = getFunctionList().get(aggFunctionVarSuffix).getName()
.getSuffix();
KsqlAggregateFunction aggregateFunction = functionRegistry.getAggregateFunction(udafName,
getFunctionList()
.get(aggFunctionVarSuffix).getArguments(), schema);
fieldSchema = aggregateFunction.getReturnType();
schemaBuilder.field(AggregateExpressionRewriter.AGGREGATE_FUNCTION_VARIABLE_PREFIX
+ aggFunctionVarSuffix, fieldSchema);
+ aggFunctionVarSuffix, aggregateFunction.getReturnType());
}

return schemaBuilder.build();
Expand Down

0 comments on commit 43b2037

Please sign in to comment.