Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JingsongLi committed Apr 25, 2021
1 parent c153cf7 commit 4a1f9d1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ public void accumulate(LagAcc<T> acc, T value) throws Exception {
}

public void accumulate(LagAcc<T> acc, T value, int offset) throws Exception {
if (offset < 0) {
throw new TableException(String.format("Offset(%d) should be positive.", offset));
}

acc.offset = offset;
accumulate(acc, value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ import scala.collection.JavaConversions._
* as subclasses of [[SqlAggFunction]] in Calcite but not as [[BridgingSqlAggFunction]]. The factory
* returns [[DeclarativeAggregateFunction]] or [[BuiltInAggregateFunction]].
*
* @param inputType the input rel data type
* @param orderKeyIdx the indexes of order key (null when is not over agg)
* @param needRetraction true if need retraction
* @param inputRowType the input row type
* @param orderKeyIndexes the indexes of order key (null when is not over agg)
* @param aggCallNeedRetractions true if need retraction
* @param isBounded true if the source is bounded source
*/
class AggFunctionFactory(
inputRowType: RowType,
Expand Down

0 comments on commit 4a1f9d1

Please sign in to comment.