Skip to content

Commit

Permalink
Updates Javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
johnedquinn committed Mar 10, 2025
1 parent c409478 commit 201491b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
17 changes: 12 additions & 5 deletions partiql-eval/src/main/java/org/partiql/eval/WindowFunction.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,25 @@
import org.jetbrains.annotations.NotNull;
import org.partiql.spi.value.Datum;

/**
* Represents an executable window function.
* @see org.partiql.plan.WindowFunctionNode
*/
public interface WindowFunction {

/**
* TODO
* @param partition TODO
* Resets the state of the window function. Implementers may hold a reference to {@code partition}.
* @param partition the partition to reset the window function for
*/
void reset(@NotNull WindowPartition partition);

/**
* TODO
* @return TODO
* Computes the result of the window function for the given environment and ordering group
* @param env the environment to use for evaluation
* @param orderingGroupStart the starting row index of the ordering group
* @param orderingGroupEnd the ending row index of the ordering group
* @return the result of the window function evaluation
*/
@NotNull
Datum eval(@NotNull Environment env, long orderingGroupStart, long orderingGroupEnd);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public interface WindowPartition {
* Returns the number of rows in this partition.
* @return the number of rows in this partition.
*/
public long size();
long size();

/**
* Retrieves the row at the given index.
Expand All @@ -20,5 +20,5 @@ public interface WindowPartition {
* @return the row at the given index
*/
@NotNull
public Row get(long index) throws RuntimeException;
Row get(long index) throws RuntimeException;
}

0 comments on commit 201491b

Please sign in to comment.