-
Notifications
You must be signed in to change notification settings - Fork 62
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
17 changed files
with
167 additions
and
102 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,6 @@ plugins { | |
} | ||
|
||
dependencies { | ||
api(Deps.ionElement) | ||
api(project(":partiql-types")) | ||
} | ||
|
||
|
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
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
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
7 changes: 7 additions & 0 deletions
7
partiql-spi/src/main/kotlin/org/partiql/spi/connector/ConnectorFunctionExperimental.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,7 @@ | ||
package org.partiql.spi.connector | ||
|
||
@RequiresOptIn( | ||
message = "ConnectorFunction requires explicit opt-in", | ||
level = RequiresOptIn.Level.ERROR, | ||
) | ||
public annotation class ConnectorFunctionExperimental |
41 changes: 41 additions & 0 deletions
41
partiql-spi/src/main/kotlin/org/partiql/spi/connector/ConnectorFunctionHandle.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,41 @@ | ||
package org.partiql.spi.connector | ||
|
||
import org.partiql.types.function.FunctionSignature | ||
|
||
/** | ||
* A [ConnectorFunctionHandle] represents the location and typing information for a [ConnectorFunction]. | ||
*/ | ||
public sealed interface ConnectorFunctionHandle { | ||
|
||
/** | ||
* The absolute path to this function's definition in the catalog. | ||
*/ | ||
public val path: ConnectorPath | ||
|
||
/** | ||
* The function's type definition. | ||
*/ | ||
public val signature: FunctionSignature | ||
|
||
/** | ||
* Handle to a scalar function. | ||
* | ||
* @property path | ||
* @property signature | ||
*/ | ||
public data class Scalar( | ||
override val path: ConnectorPath, | ||
override val signature: FunctionSignature.Scalar, | ||
) : ConnectorFunctionHandle | ||
|
||
/** | ||
* Handle to an aggregation function. | ||
* | ||
* @property path | ||
* @property signature | ||
*/ | ||
public data class Aggregation( | ||
override val path: ConnectorPath, | ||
override val signature: FunctionSignature.Aggregation, | ||
) : ConnectorFunctionHandle | ||
} |
22 changes: 5 additions & 17 deletions
22
partiql-spi/src/main/kotlin/org/partiql/spi/connector/ConnectorFunctions.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 |
---|---|---|
@@ -1,24 +1,12 @@ | ||
package org.partiql.spi.connector | ||
|
||
import org.partiql.types.function.FunctionSignature | ||
|
||
/** | ||
* ConnectorFunctions holds the function signatures for a catalogs builtins. | ||
* A [ConnectorFunctions] implementation is responsible for linking a handle to a function implementation for execution. | ||
*/ | ||
public abstract class ConnectorFunctions { | ||
|
||
/** | ||
* Scalar function signatures available via call syntax. | ||
*/ | ||
public open val functions: List<FunctionSignature.Scalar> = emptyList() | ||
@ConnectorFunctionExperimental | ||
public interface ConnectorFunctions { | ||
|
||
/** | ||
* Scalar function signatures available via operator or special form syntax. | ||
*/ | ||
public open val operators: List<FunctionSignature.Scalar> = emptyList() | ||
public fun getScalarFunction(handle: ConnectorFunctionHandle.Scalar): ConnectorFunction.Scalar | ||
|
||
/** | ||
* Aggregation function signatures. | ||
*/ | ||
public open val aggregations: List<FunctionSignature.Aggregation> = emptyList() | ||
public fun getAggregationFunction(handle: ConnectorFunctionHandle.Aggregation): ConnectorFunction.Aggregation | ||
} |
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
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
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
Oops, something went wrong.