mirror of https://github.com/apache/druid.git
make things final and fix copy-paste errors
This commit is contained in:
parent
04e285638e
commit
66181be1c6
|
@ -52,7 +52,7 @@ public class JavaScriptPostAggregator implements PostAggregator
|
|||
|
||||
private static Function compile(String function) {
|
||||
final ContextFactory contextFactory = ContextFactory.getGlobal();
|
||||
Context context = contextFactory.enterContext();
|
||||
final Context context = contextFactory.enterContext();
|
||||
context.setOptimizationLevel(9);
|
||||
|
||||
final ScriptableObject scope = context.initStandardObjects();
|
||||
|
@ -90,9 +90,9 @@ public class JavaScriptPostAggregator implements PostAggregator
|
|||
@JsonProperty("function") final String function
|
||||
)
|
||||
{
|
||||
Preconditions.checkNotNull(name, "Must have a valid, non-null aggregator name");
|
||||
Preconditions.checkNotNull(name, "Must have a valid, non-null post-aggregator name");
|
||||
Preconditions.checkNotNull(fieldNames, "Must have a valid, non-null fieldNames");
|
||||
Preconditions.checkNotNull(function, "Must have a valid, non-null fnAggregate");
|
||||
Preconditions.checkNotNull(function, "Must have a valid, non-null function");
|
||||
|
||||
this.name = name;
|
||||
this.fieldNames = fieldNames;
|
||||
|
@ -116,7 +116,7 @@ public class JavaScriptPostAggregator implements PostAggregator
|
|||
@Override
|
||||
public Object compute(Map<String, Object> combinedAggregators)
|
||||
{
|
||||
Object[] args = new Object[fieldNames.size()];
|
||||
final Object[] args = new Object[fieldNames.size()];
|
||||
int i = 0;
|
||||
for(String field : fieldNames) {
|
||||
args[i++] = combinedAggregators.get(field);
|
||||
|
|
Loading…
Reference in New Issue