Skip to content

Commit

Permalink
Fix broken UT after merge
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Dai <[email protected]>
  • Loading branch information
dai-chen committed Nov 7, 2022
1 parent 1e7ad03 commit 6511f61
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,18 @@ public class SpanExpression implements Expression {
private final Expression value;
private final SpanUnit unit;

/**
* Rounding that generates span starting point.
*/
@ToString.Exclude
private final Rounding<?> rounding;

/**
* Construct a span expression by field and span interval expression.
*/
public SpanExpression(Expression field, Expression value, SpanUnit unit) {
this.field = field;
this.value = value;
this.unit = unit;
this.rounding = Rounding.createRounding(this); // TODO: will integrate with WindowAssigner
}

@Override
public ExprValue valueOf(Environment<Expression, ExprValue> valueEnv) {
Rounding<?> rounding = Rounding.createRounding(this); //TODO: will integrate with WindowAssigner
return rounding.round(field.valueOf(valueEnv));
}

Expand Down

0 comments on commit 6511f61

Please sign in to comment.