-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
152 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 0 additions & 41 deletions
41
partiql-plan/src/main/kotlin/org/partiql/plan/v1/operator/rex/RexPath.kt
This file was deleted.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
partiql-plan/src/main/kotlin/org/partiql/plan/v1/operator/rex/RexPathIndex.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.partiql.plan.v1.operator.rex | ||
|
||
import org.partiql.types.PType | ||
|
||
/** | ||
* Logical path index operator. | ||
*/ | ||
public interface RexPathIndex : Rex { | ||
|
||
public fun getOperand(): Rex | ||
|
||
public fun getIndex(): Rex | ||
|
||
override fun <R, C> accept(visitor: RexVisitor<R, C>, ctx: C): R = visitor.visitPathIndex(this, ctx) | ||
} | ||
|
||
/** | ||
* Standard internal implementation for [RexPathIndex]. | ||
*/ | ||
internal class RexPathIndexImpl(root: Rex, index: Rex) : RexPathIndex { | ||
|
||
// DO NOT USE FINAL | ||
private var _root = root | ||
private var _index = index | ||
|
||
override fun getOperand() = _root | ||
|
||
override fun getIndex() = _index | ||
|
||
override fun getType(): PType { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override fun getChildren(): Collection<Rex> = listOf(_root, _index) | ||
} |
35 changes: 35 additions & 0 deletions
35
partiql-plan/src/main/kotlin/org/partiql/plan/v1/operator/rex/RexPathKey.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.partiql.plan.v1.operator.rex | ||
|
||
import org.partiql.types.PType | ||
|
||
/** | ||
* Logical operator for path lookup by key. | ||
*/ | ||
public interface RexPathKey : Rex { | ||
|
||
public fun getOperand(): Rex | ||
|
||
public fun getKey(): Rex | ||
|
||
override fun <R, C> accept(visitor: RexVisitor<R, C>, ctx: C): R = visitor.visitPathKey(this, ctx) | ||
} | ||
|
||
/** | ||
* Standard internal implementation for [RexPathKey]. | ||
*/ | ||
internal class RexPathKeyImpl(root: Rex, key: Rex) : RexPathKey { | ||
|
||
// DO NOT USE FINAL | ||
private var _root = root | ||
private var _key = key | ||
|
||
override fun getOperand() = _root | ||
|
||
override fun getKey() = _key | ||
|
||
override fun getType(): PType { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override fun getChildren(): Collection<Rex> = listOf(_root, _key) | ||
} |
35 changes: 35 additions & 0 deletions
35
partiql-plan/src/main/kotlin/org/partiql/plan/v1/operator/rex/RexPathSymbol.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.partiql.plan.v1.operator.rex | ||
|
||
import org.partiql.types.PType | ||
|
||
/** | ||
* Logical operator for path lookup by symbol. | ||
*/ | ||
public interface RexPathSymbol : Rex { | ||
|
||
public fun getOperand(): Rex | ||
|
||
public fun getSymbol(): String | ||
|
||
override fun <R, C> accept(visitor: RexVisitor<R, C>, ctx: C): R = visitor.visitPathSymbol(this, ctx) | ||
} | ||
|
||
/** | ||
* Standard internal implementation for [RexPathSymbol]. | ||
*/ | ||
internal class RexPathSymbolImpl(root: Rex, symbol: String) : RexPathSymbol { | ||
|
||
// DO NOT USE FINAL | ||
private var _root = root | ||
private var _symbol = symbol | ||
|
||
override fun getOperand() = _root | ||
|
||
override fun getSymbol() = _symbol | ||
|
||
override fun getType(): PType { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override fun getChildren(): Collection<Rex> = listOf(_root) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters