Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yliuuuu committed Nov 19, 2022
1 parent 6305c9f commit 206fffb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.partiql.lang.eval.physical.operators

import org.partiql.lang.eval.physical.window.ExperimentalWindowFunc

/**
* Indicates which physical relational operator a [RelationalOperatorFactory] can create instances of.
*
Expand All @@ -14,7 +16,6 @@ enum class RelationalOperatorKind {
UNPIVOT,
FILTER,
JOIN,
// TODO: Remove from experimental once https://github.com/partiql/partiql-docs/issues/31 is resolved and a RFC is approved
WINDOW,
OFFSET,
LIMIT,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.partiql.lang.eval.physical.operators

import org.partiql.lang.domains.PartiqlPhysical
import org.partiql.lang.eval.physical.SetVariableFunc
import org.partiql.lang.eval.physical.window.ExperimentalWindowFunc
import org.partiql.lang.eval.physical.window.WindowFunction

Expand All @@ -24,5 +25,9 @@ abstract class WindowRelationalOperatorFactory(name: String) : RelationalOperato
class CompiledWindowFunction(
val func: WindowFunction,
val parameters: List<ValueExpression>,
/**
* This is [PartiqlPhysical.VarDecl] instead of [SetVariableFunc] because we would like to access the index of variable in the register
* when processing rows within the partition.
*/
val windowVarDecl: PartiqlPhysical.VarDecl
)
1 change: 1 addition & 0 deletions lang/src/org/partiql/lang/eval/physical/window/Lag.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.partiql.lang.eval.physical.EvaluatorState
import org.partiql.lang.eval.physical.operators.ValueExpression

// TODO: Remove from experimental once https://github.com/partiql/partiql-docs/issues/31 is resolved and a RFC is approved
// TODO: Decide if we should reduce the code duplication by combining lead and lag function
@ExperimentalWindowFunc
internal class Lag : NavigationWindowFunction() {
override val name = "lag"
Expand Down
1 change: 1 addition & 0 deletions lang/src/org/partiql/lang/eval/physical/window/Lead.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.partiql.lang.eval.physical.EvaluatorState
import org.partiql.lang.eval.physical.operators.ValueExpression

// TODO: Remove from experimental once https://github.com/partiql/partiql-docs/issues/31 is resolved and a RFC is approved
// TODO: Decide if we should reduce the code duplication by combining lead and lag function.
@ExperimentalWindowFunc
internal class Lead : NavigationWindowFunction() {

Expand Down

0 comments on commit 206fffb

Please sign in to comment.