/** * Constructor for {@link #decorate(Map)}. */ private ExpressionPostAggregator( final String name, final String expression, @Nullable final String ordering, final ExprMacroTable macroTable, final Map<String, Function<Object, Object>> finalizers ) { Preconditions.checkArgument(expression != null, "expression cannot be null"); this.name = name; this.expression = expression; this.ordering = ordering; this.comparator = ordering == null ? DEFAULT_COMPARATOR : Ordering.valueOf(ordering); this.macroTable = macroTable; this.finalizers = finalizers; this.parsed = Parser.parse(expression, macroTable); this.dependentFields = ImmutableSet.copyOf(Parser.findRequiredBindings(parsed)); }
/** * Constructor for {@link #decorate(Map)}. */ private ExpressionPostAggregator( final String name, final String expression, @Nullable final String ordering, final ExprMacroTable macroTable, final Map<String, Function<Object, Object>> finalizers ) { Preconditions.checkArgument(expression != null, "expression cannot be null"); this.name = name; this.expression = expression; this.ordering = ordering; this.comparator = ordering == null ? DEFAULT_COMPARATOR : Ordering.valueOf(ordering); this.macroTable = macroTable; this.finalizers = finalizers; this.parsed = Parser.parse(expression, macroTable); this.dependentFields = ImmutableSet.copyOf(Parser.findRequiredBindings(parsed)); }