diff --git a/partiql-spi/build.gradle.kts b/partiql-spi/build.gradle.kts index d7995a3b6a..27a3016a65 100644 --- a/partiql-spi/build.gradle.kts +++ b/partiql-spi/build.gradle.kts @@ -21,6 +21,7 @@ plugins { dependencies { api(Deps.ionElement) api(project(":partiql-types")) + testImplementation(Deps.kasechange) } publish { diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/SqlBindings.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/SqlBindings.kt index 82a4da9c73..f4b66873d4 100644 --- a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/SqlBindings.kt +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/SqlBindings.kt @@ -29,4 +29,4 @@ public class SqlBindings(private val info: InfoSchema) : ConnectorBindings { public override fun getValue(handle: ConnectorHandle.Obj): PartiQLValue { TODO("Not yet implemented") } -} \ No newline at end of file +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/SqlBuiltins.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/SqlBuiltins.kt index cc444ae56d..c65eea6b18 100644 --- a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/SqlBuiltins.kt +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/SqlBuiltins.kt @@ -1,11 +1,9 @@ package org.partiql.spi.connector.sql +import org.partiql.spi.connector.sql.internal.builtins.agg.* +import org.partiql.spi.connector.sql.internal.builtins.scalar.* import org.partiql.spi.fn.Fn -import org.partiql.spi.fn.FnAggregation import org.partiql.spi.fn.FnExperimental -import org.partiql.spi.fn.FnScalar -import org.partiql.spi.fn.FnSignature -import org.partiql.value.PartiQLValue import org.partiql.value.PartiQLValueExperimental /** @@ -15,20 +13,492 @@ import org.partiql.value.PartiQLValueExperimental internal object SqlBuiltins { @JvmStatic - private val scalars: List = SqlHeader.functions.map { - object : FnScalar { - override val signature: FnSignature.Scalar = it - override fun invoke(args: Array): PartiQLValue = error("${it.name} not implemented") - } - } + private val scalars: List = listOf( + Fn_POS__INT8__INT8, + Fn_POS__INT16__INT16, + Fn_POS__INT32__INT32, + Fn_POS__INT64__INT64, + Fn_POS__INT__INT, + Fn_POS__DECIMAL_ARBITRARY__DECIMAL_ARBITRARY, + Fn_POS__FLOAT32__FLOAT32, + Fn_POS__FLOAT64__FLOAT64, + Fn_NEG__INT8__INT8, + Fn_NEG__INT16__INT16, + Fn_NEG__INT32__INT32, + Fn_NEG__INT64__INT64, + Fn_NEG__INT__INT, + Fn_NEG__DECIMAL_ARBITRARY__DECIMAL_ARBITRARY, + Fn_NEG__FLOAT32__FLOAT32, + Fn_NEG__FLOAT64__FLOAT64, + Fn_PLUS__INT8_INT8__INT8, + Fn_PLUS__INT16_INT16__INT16, + Fn_PLUS__INT32_INT32__INT32, + Fn_PLUS__INT64_INT64__INT64, + Fn_PLUS__INT_INT__INT, + Fn_PLUS__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__DECIMAL_ARBITRARY, + Fn_PLUS__FLOAT32_FLOAT32__FLOAT32, + Fn_PLUS__FLOAT64_FLOAT64__FLOAT64, + Fn_MINUS__INT8_INT8__INT8, + Fn_MINUS__INT16_INT16__INT16, + Fn_MINUS__INT32_INT32__INT32, + Fn_MINUS__INT64_INT64__INT64, + Fn_MINUS__INT_INT__INT, + Fn_MINUS__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__DECIMAL_ARBITRARY, + Fn_MINUS__FLOAT32_FLOAT32__FLOAT32, + Fn_MINUS__FLOAT64_FLOAT64__FLOAT64, + Fn_TIMES__INT8_INT8__INT8, + Fn_TIMES__INT16_INT16__INT16, + Fn_TIMES__INT32_INT32__INT32, + Fn_TIMES__INT64_INT64__INT64, + Fn_TIMES__INT_INT__INT, + Fn_TIMES__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__DECIMAL_ARBITRARY, + Fn_TIMES__FLOAT32_FLOAT32__FLOAT32, + Fn_TIMES__FLOAT64_FLOAT64__FLOAT64, + Fn_DIVIDE__INT8_INT8__INT8, + Fn_DIVIDE__INT16_INT16__INT16, + Fn_DIVIDE__INT32_INT32__INT32, + Fn_DIVIDE__INT64_INT64__INT64, + Fn_DIVIDE__INT_INT__INT, + Fn_DIVIDE__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__DECIMAL_ARBITRARY, + Fn_DIVIDE__FLOAT32_FLOAT32__FLOAT32, + Fn_DIVIDE__FLOAT64_FLOAT64__FLOAT64, + Fn_MODULO__INT8_INT8__INT8, + Fn_MODULO__INT16_INT16__INT16, + Fn_MODULO__INT32_INT32__INT32, + Fn_MODULO__INT64_INT64__INT64, + Fn_MODULO__INT_INT__INT, + Fn_MODULO__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__DECIMAL_ARBITRARY, + Fn_MODULO__FLOAT32_FLOAT32__FLOAT32, + Fn_MODULO__FLOAT64_FLOAT64__FLOAT64, + Fn_CONCAT__STRING_STRING__STRING, + Fn_CONCAT__SYMBOL_SYMBOL__SYMBOL, + Fn_CONCAT__CLOB_CLOB__CLOB, + Fn_BITWISE_AND__INT8_INT8__INT8, + Fn_BITWISE_AND__INT16_INT16__INT16, + Fn_BITWISE_AND__INT32_INT32__INT32, + Fn_BITWISE_AND__INT64_INT64__INT64, + Fn_BITWISE_AND__INT_INT__INT + ) + listOf( + Fn_UPPER__STRING__STRING, + Fn_UPPER__SYMBOL__SYMBOL, + Fn_UPPER__CLOB__CLOB, + Fn_LOWER__STRING__STRING, + Fn_LOWER__SYMBOL__SYMBOL, + Fn_LOWER__CLOB__CLOB, + Fn_POSITION__STRING_STRING__INT64, + Fn_POSITION__SYMBOL_SYMBOL__INT64, + Fn_POSITION__CLOB_CLOB__INT64, + Fn_POSITION__STRING_STRING__INT64, + Fn_POSITION__SYMBOL_SYMBOL__INT64, + Fn_POSITION__CLOB_CLOB__INT64, + Fn_SUBSTRING__STRING_INT64__STRING, + Fn_SUBSTRING__STRING_INT64_INT64__STRING, + Fn_SUBSTRING__SYMBOL_INT64__SYMBOL, + Fn_SUBSTRING__SYMBOL_INT64_INT64__SYMBOL, + Fn_SUBSTRING__CLOB_INT64__CLOB, + Fn_SUBSTRING__CLOB_INT64_INT64__CLOB, + Fn_SUBSTRING__STRING_INT64__STRING, + Fn_SUBSTRING__STRING_INT64_INT64__STRING, + Fn_SUBSTRING__SYMBOL_INT64__SYMBOL, + Fn_SUBSTRING__SYMBOL_INT64_INT64__SYMBOL, + Fn_SUBSTRING__CLOB_INT64__CLOB, + Fn_SUBSTRING__CLOB_INT64_INT64__CLOB, + Fn_TRIM__STRING__STRING, + Fn_TRIM__SYMBOL__SYMBOL, + Fn_TRIM__CLOB__CLOB, + Fn_UTCNOW____TIMESTAMP, + Fn_NOT__BOOL__BOOL, + Fn_NOT__MISSING__BOOL, + Fn_AND__BOOL_BOOL__BOOL, + Fn_AND__MISSING_BOOL__BOOL, + Fn_AND__BOOL_MISSING__BOOL, + Fn_AND__MISSING_MISSING__BOOL, + Fn_OR__BOOL_BOOL__BOOL, + Fn_OR__MISSING_BOOL__BOOL, + Fn_OR__BOOL_MISSING__BOOL, + Fn_OR__MISSING_MISSING__BOOL, + Fn_LT__INT8_INT8__BOOL, + Fn_LT__INT16_INT16__BOOL, + Fn_LT__INT32_INT32__BOOL, + Fn_LT__INT64_INT64__BOOL, + Fn_LT__INT_INT__BOOL, + Fn_LT__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__BOOL, + Fn_LT__FLOAT32_FLOAT32__BOOL, + Fn_LT__FLOAT64_FLOAT64__BOOL, + Fn_LT__STRING_STRING__BOOL, + Fn_LT__SYMBOL_SYMBOL__BOOL, + Fn_LT__CLOB_CLOB__BOOL, + Fn_LT__DATE_DATE__BOOL, + Fn_LT__TIME_TIME__BOOL, + Fn_LT__TIMESTAMP_TIMESTAMP__BOOL, + Fn_LT__BOOL_BOOL__BOOL, + Fn_LTE__INT8_INT8__BOOL, + Fn_LTE__INT16_INT16__BOOL, + Fn_LTE__INT32_INT32__BOOL, + Fn_LTE__INT64_INT64__BOOL, + Fn_LTE__INT_INT__BOOL, + Fn_LTE__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__BOOL, + Fn_LTE__FLOAT32_FLOAT32__BOOL, + Fn_LTE__FLOAT64_FLOAT64__BOOL, + Fn_LTE__STRING_STRING__BOOL, + Fn_LTE__SYMBOL_SYMBOL__BOOL, + Fn_LTE__CLOB_CLOB__BOOL, + Fn_LTE__DATE_DATE__BOOL, + Fn_LTE__TIME_TIME__BOOL, + Fn_LTE__TIMESTAMP_TIMESTAMP__BOOL, + Fn_LTE__BOOL_BOOL__BOOL, + Fn_GT__INT8_INT8__BOOL, + Fn_GT__INT16_INT16__BOOL, + Fn_GT__INT32_INT32__BOOL, + Fn_GT__INT64_INT64__BOOL, + Fn_GT__INT_INT__BOOL, + Fn_GT__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__BOOL, + Fn_GT__FLOAT32_FLOAT32__BOOL, + Fn_GT__FLOAT64_FLOAT64__BOOL, + Fn_GT__STRING_STRING__BOOL, + Fn_GT__SYMBOL_SYMBOL__BOOL, + Fn_GT__CLOB_CLOB__BOOL, + Fn_GT__DATE_DATE__BOOL, + Fn_GT__TIME_TIME__BOOL, + Fn_GT__TIMESTAMP_TIMESTAMP__BOOL, + Fn_GT__BOOL_BOOL__BOOL, + Fn_GTE__INT8_INT8__BOOL, + Fn_GTE__INT16_INT16__BOOL, + Fn_GTE__INT32_INT32__BOOL, + Fn_GTE__INT64_INT64__BOOL, + Fn_GTE__INT_INT__BOOL, + Fn_GTE__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__BOOL, + Fn_GTE__FLOAT32_FLOAT32__BOOL, + Fn_GTE__FLOAT64_FLOAT64__BOOL, + Fn_GTE__STRING_STRING__BOOL, + Fn_GTE__SYMBOL_SYMBOL__BOOL, + Fn_GTE__CLOB_CLOB__BOOL, + Fn_GTE__DATE_DATE__BOOL, + Fn_GTE__TIME_TIME__BOOL, + Fn_GTE__TIMESTAMP_TIMESTAMP__BOOL, + Fn_GTE__BOOL_BOOL__BOOL, + Fn_EQ__ANY_ANY__BOOL, + Fn_EQ__BOOL_BOOL__BOOL, + Fn_EQ__INT8_INT8__BOOL, + Fn_EQ__INT16_INT16__BOOL, + Fn_EQ__INT32_INT32__BOOL, + Fn_EQ__INT64_INT64__BOOL, + Fn_EQ__INT_INT__BOOL, + Fn_EQ__DECIMAL_DECIMAL__BOOL, + Fn_EQ__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__BOOL, + Fn_EQ__FLOAT32_FLOAT32__BOOL, + Fn_EQ__FLOAT64_FLOAT64__BOOL, + Fn_EQ__CHAR_CHAR__BOOL, + Fn_EQ__STRING_STRING__BOOL, + Fn_EQ__SYMBOL_SYMBOL__BOOL, + Fn_EQ__BINARY_BINARY__BOOL, + Fn_EQ__BYTE_BYTE__BOOL, + Fn_EQ__BLOB_BLOB__BOOL, + Fn_EQ__CLOB_CLOB__BOOL, + Fn_EQ__DATE_DATE__BOOL, + Fn_EQ__TIME_TIME__BOOL, + Fn_EQ__TIMESTAMP_TIMESTAMP__BOOL, + Fn_EQ__INTERVAL_INTERVAL__BOOL, + Fn_EQ__BAG_BAG__BOOL, + Fn_EQ__LIST_LIST__BOOL, + Fn_EQ__SEXP_SEXP__BOOL, + Fn_EQ__STRUCT_STRUCT__BOOL, + Fn_EQ__NULL_NULL__BOOL, + Fn_EQ__MISSING_MISSING__BOOL, + Fn_BETWEEN__INT8_INT8_INT8__BOOL, + Fn_BETWEEN__INT16_INT16_INT16__BOOL, + Fn_BETWEEN__INT32_INT32_INT32__BOOL, + Fn_BETWEEN__INT64_INT64_INT64__BOOL, + Fn_BETWEEN__INT_INT_INT__BOOL, + Fn_BETWEEN__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__BOOL, + Fn_BETWEEN__FLOAT32_FLOAT32_FLOAT32__BOOL, + Fn_BETWEEN__FLOAT64_FLOAT64_FLOAT64__BOOL, + Fn_BETWEEN__STRING_STRING_STRING__BOOL, + Fn_BETWEEN__SYMBOL_SYMBOL_SYMBOL__BOOL, + Fn_BETWEEN__CLOB_CLOB_CLOB__BOOL, + Fn_BETWEEN__DATE_DATE_DATE__BOOL, + Fn_BETWEEN__TIME_TIME_TIME__BOOL, + Fn_BETWEEN__TIMESTAMP_TIMESTAMP_TIMESTAMP__BOOL, + Fn_IN_COLLECTION__ANY_BAG__BOOL, + Fn_IN_COLLECTION__ANY_LIST__BOOL, + Fn_IN_COLLECTION__ANY_SEXP__BOOL, + Fn_IN_COLLECTION__BOOL_BAG__BOOL, + Fn_IN_COLLECTION__BOOL_LIST__BOOL, + Fn_IN_COLLECTION__BOOL_SEXP__BOOL, + Fn_IN_COLLECTION__INT8_BAG__BOOL, + Fn_IN_COLLECTION__INT8_LIST__BOOL, + Fn_IN_COLLECTION__INT8_SEXP__BOOL, + Fn_IN_COLLECTION__INT16_BAG__BOOL, + Fn_IN_COLLECTION__INT16_LIST__BOOL, + Fn_IN_COLLECTION__INT16_SEXP__BOOL, + Fn_IN_COLLECTION__INT32_BAG__BOOL, + Fn_IN_COLLECTION__INT32_LIST__BOOL, + Fn_IN_COLLECTION__INT32_SEXP__BOOL, + Fn_IN_COLLECTION__INT64_BAG__BOOL, + Fn_IN_COLLECTION__INT64_LIST__BOOL, + Fn_IN_COLLECTION__INT64_SEXP__BOOL, + Fn_IN_COLLECTION__INT_BAG__BOOL, + Fn_IN_COLLECTION__INT_LIST__BOOL, + Fn_IN_COLLECTION__INT_SEXP__BOOL, + Fn_IN_COLLECTION__DECIMAL_BAG__BOOL, + Fn_IN_COLLECTION__DECIMAL_LIST__BOOL, + Fn_IN_COLLECTION__DECIMAL_SEXP__BOOL, + Fn_IN_COLLECTION__DECIMAL_ARBITRARY_BAG__BOOL, + Fn_IN_COLLECTION__DECIMAL_ARBITRARY_LIST__BOOL, + Fn_IN_COLLECTION__DECIMAL_ARBITRARY_SEXP__BOOL, + Fn_IN_COLLECTION__FLOAT32_BAG__BOOL, + Fn_IN_COLLECTION__FLOAT32_LIST__BOOL, + Fn_IN_COLLECTION__FLOAT32_SEXP__BOOL, + Fn_IN_COLLECTION__FLOAT64_BAG__BOOL, + Fn_IN_COLLECTION__FLOAT64_LIST__BOOL, + Fn_IN_COLLECTION__FLOAT64_SEXP__BOOL, + Fn_IN_COLLECTION__CHAR_BAG__BOOL, + Fn_IN_COLLECTION__CHAR_LIST__BOOL, + Fn_IN_COLLECTION__CHAR_SEXP__BOOL, + Fn_IN_COLLECTION__STRING_BAG__BOOL, + Fn_IN_COLLECTION__STRING_LIST__BOOL, + Fn_IN_COLLECTION__STRING_SEXP__BOOL, + Fn_IN_COLLECTION__SYMBOL_BAG__BOOL, + Fn_IN_COLLECTION__SYMBOL_LIST__BOOL, + Fn_IN_COLLECTION__SYMBOL_SEXP__BOOL, + Fn_IN_COLLECTION__BINARY_BAG__BOOL, + Fn_IN_COLLECTION__BINARY_LIST__BOOL, + Fn_IN_COLLECTION__BINARY_SEXP__BOOL, + Fn_IN_COLLECTION__BYTE_BAG__BOOL, + Fn_IN_COLLECTION__BYTE_LIST__BOOL, + Fn_IN_COLLECTION__BYTE_SEXP__BOOL, + Fn_IN_COLLECTION__BLOB_BAG__BOOL, + Fn_IN_COLLECTION__BLOB_LIST__BOOL, + Fn_IN_COLLECTION__BLOB_SEXP__BOOL, + Fn_IN_COLLECTION__CLOB_BAG__BOOL, + Fn_IN_COLLECTION__CLOB_LIST__BOOL, + Fn_IN_COLLECTION__CLOB_SEXP__BOOL, + Fn_IN_COLLECTION__DATE_BAG__BOOL, + Fn_IN_COLLECTION__DATE_LIST__BOOL, + Fn_IN_COLLECTION__DATE_SEXP__BOOL, + Fn_IN_COLLECTION__TIME_BAG__BOOL, + Fn_IN_COLLECTION__TIME_LIST__BOOL, + Fn_IN_COLLECTION__TIME_SEXP__BOOL, + Fn_IN_COLLECTION__TIMESTAMP_BAG__BOOL, + Fn_IN_COLLECTION__TIMESTAMP_LIST__BOOL, + Fn_IN_COLLECTION__TIMESTAMP_SEXP__BOOL, + Fn_IN_COLLECTION__INTERVAL_BAG__BOOL, + Fn_IN_COLLECTION__INTERVAL_LIST__BOOL, + Fn_IN_COLLECTION__INTERVAL_SEXP__BOOL, + Fn_IN_COLLECTION__BAG_BAG__BOOL, + Fn_IN_COLLECTION__BAG_LIST__BOOL, + Fn_IN_COLLECTION__BAG_SEXP__BOOL, + Fn_IN_COLLECTION__LIST_BAG__BOOL, + Fn_IN_COLLECTION__LIST_LIST__BOOL, + Fn_IN_COLLECTION__LIST_SEXP__BOOL, + Fn_IN_COLLECTION__SEXP_BAG__BOOL, + Fn_IN_COLLECTION__SEXP_LIST__BOOL, + Fn_IN_COLLECTION__SEXP_SEXP__BOOL, + Fn_IN_COLLECTION__STRUCT_BAG__BOOL, + Fn_IN_COLLECTION__STRUCT_LIST__BOOL, + Fn_IN_COLLECTION__STRUCT_SEXP__BOOL, + Fn_IN_COLLECTION__NULL_BAG__BOOL, + Fn_IN_COLLECTION__NULL_LIST__BOOL, + Fn_IN_COLLECTION__NULL_SEXP__BOOL, + Fn_IN_COLLECTION__MISSING_BAG__BOOL, + Fn_IN_COLLECTION__MISSING_LIST__BOOL, + Fn_IN_COLLECTION__MISSING_SEXP__BOOL, + Fn_LIKE__STRING_STRING__BOOL, + Fn_LIKE__SYMBOL_SYMBOL__BOOL, + Fn_LIKE__CLOB_CLOB__BOOL, + Fn_LIKE_ESCAPE__STRING_STRING_STRING__BOOL, + Fn_LIKE_ESCAPE__SYMBOL_SYMBOL_SYMBOL__BOOL, + Fn_LIKE_ESCAPE__CLOB_CLOB_CLOB__BOOL, + Fn_IS_NULL__ANY__BOOL, + Fn_IS_MISSING__ANY__BOOL, + Fn_IS_ANY__ANY__BOOL, + Fn_IS_BOOL__ANY__BOOL, + Fn_IS_INT8__ANY__BOOL, + Fn_IS_INT16__ANY__BOOL, + Fn_IS_INT32__ANY__BOOL, + Fn_IS_INT64__ANY__BOOL, + Fn_IS_INT__ANY__BOOL, + Fn_IS_DECIMAL__ANY__BOOL, + Fn_IS_DECIMAL__INT32_INT32_ANY__BOOL, + Fn_IS_DECIMAL_ARBITRARY__ANY__BOOL, + Fn_IS_FLOAT32__ANY__BOOL, + Fn_IS_FLOAT64__ANY__BOOL, + Fn_IS_CHAR__ANY__BOOL, + Fn_IS_CHAR__INT32_ANY__BOOL, + Fn_IS_STRING__ANY__BOOL, + Fn_IS_STRING__INT32_ANY__BOOL, + Fn_IS_SYMBOL__ANY__BOOL, + Fn_IS_BINARY__ANY__BOOL, + Fn_IS_BYTE__ANY__BOOL, + Fn_IS_BLOB__ANY__BOOL, + Fn_IS_CLOB__ANY__BOOL, + Fn_IS_DATE__ANY__BOOL, + Fn_IS_TIME__ANY__BOOL, + Fn_IS_TIME__BOOL_INT32_ANY__BOOL, + Fn_IS_TIMESTAMP__ANY__BOOL, + Fn_IS_TIMESTAMP__BOOL_INT32_ANY__BOOL, + Fn_IS_INTERVAL__ANY__BOOL, + Fn_IS_BAG__ANY__BOOL, + Fn_IS_LIST__ANY__BOOL, + Fn_IS_SEXP__ANY__BOOL, + Fn_IS_STRUCT__ANY__BOOL, + Fn_POS__INT8__INT8, + Fn_POS__INT16__INT16, + Fn_POS__INT32__INT32, + Fn_POS__INT64__INT64, + Fn_POS__INT__INT, + Fn_POS__DECIMAL_ARBITRARY__DECIMAL_ARBITRARY, + Fn_POS__FLOAT32__FLOAT32, + Fn_POS__FLOAT64__FLOAT64, + Fn_NEG__INT8__INT8, + Fn_NEG__INT16__INT16, + Fn_NEG__INT32__INT32, + Fn_NEG__INT64__INT64, + Fn_NEG__INT__INT, + Fn_NEG__DECIMAL_ARBITRARY__DECIMAL_ARBITRARY, + Fn_NEG__FLOAT32__FLOAT32, + Fn_NEG__FLOAT64__FLOAT64, + Fn_PLUS__INT8_INT8__INT8, + Fn_PLUS__INT16_INT16__INT16, + Fn_PLUS__INT32_INT32__INT32, + Fn_PLUS__INT64_INT64__INT64, + Fn_PLUS__INT_INT__INT, + Fn_PLUS__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__DECIMAL_ARBITRARY, + Fn_PLUS__FLOAT32_FLOAT32__FLOAT32, + Fn_PLUS__FLOAT64_FLOAT64__FLOAT64, + Fn_MINUS__INT8_INT8__INT8, + Fn_MINUS__INT16_INT16__INT16, + Fn_MINUS__INT32_INT32__INT32, + Fn_MINUS__INT64_INT64__INT64, + Fn_MINUS__INT_INT__INT, + Fn_MINUS__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__DECIMAL_ARBITRARY, + Fn_MINUS__FLOAT32_FLOAT32__FLOAT32, + Fn_MINUS__FLOAT64_FLOAT64__FLOAT64, + Fn_TIMES__INT8_INT8__INT8, + Fn_TIMES__INT16_INT16__INT16, + Fn_TIMES__INT32_INT32__INT32, + Fn_TIMES__INT64_INT64__INT64, + Fn_TIMES__INT_INT__INT, + Fn_TIMES__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__DECIMAL_ARBITRARY, + Fn_TIMES__FLOAT32_FLOAT32__FLOAT32, + Fn_TIMES__FLOAT64_FLOAT64__FLOAT64, + Fn_DIVIDE__INT8_INT8__INT8, + Fn_DIVIDE__INT16_INT16__INT16, + Fn_DIVIDE__INT32_INT32__INT32, + Fn_DIVIDE__INT64_INT64__INT64, + Fn_DIVIDE__INT_INT__INT, + Fn_DIVIDE__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__DECIMAL_ARBITRARY, + Fn_DIVIDE__FLOAT32_FLOAT32__FLOAT32, + Fn_DIVIDE__FLOAT64_FLOAT64__FLOAT64, + Fn_MODULO__INT8_INT8__INT8, + Fn_MODULO__INT16_INT16__INT16, + Fn_MODULO__INT32_INT32__INT32, + Fn_MODULO__INT64_INT64__INT64, + Fn_MODULO__INT_INT__INT, + Fn_MODULO__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__DECIMAL_ARBITRARY, + Fn_MODULO__FLOAT32_FLOAT32__FLOAT32, + Fn_MODULO__FLOAT64_FLOAT64__FLOAT64, + Fn_CONCAT__STRING_STRING__STRING, + Fn_CONCAT__SYMBOL_SYMBOL__SYMBOL, + Fn_CONCAT__CLOB_CLOB__CLOB, + Fn_BITWISE_AND__INT8_INT8__INT8, + Fn_BITWISE_AND__INT16_INT16__INT16, + Fn_BITWISE_AND__INT32_INT32__INT32, + Fn_BITWISE_AND__INT64_INT64__INT64, + Fn_BITWISE_AND__INT_INT__INT, + Fn_TRIM_CHARS__STRING_STRING__STRING, + Fn_TRIM_CHARS__SYMBOL_SYMBOL__SYMBOL, + Fn_TRIM_CHARS__CLOB_CLOB__CLOB, + Fn_TRIM_LEADING__STRING__STRING, + Fn_TRIM_LEADING__SYMBOL__SYMBOL, + Fn_TRIM_LEADING__CLOB__CLOB, + Fn_TRIM_LEADING_CHARS__STRING_STRING__STRING, + Fn_TRIM_LEADING_CHARS__SYMBOL_SYMBOL__SYMBOL, + Fn_TRIM_LEADING_CHARS__CLOB_CLOB__CLOB, + Fn_TRIM_TRAILING__STRING__STRING, + Fn_TRIM_TRAILING__SYMBOL__SYMBOL, + Fn_TRIM_TRAILING__CLOB__CLOB, + Fn_TRIM_TRAILING_CHARS__STRING_STRING__STRING, + Fn_TRIM_TRAILING_CHARS__SYMBOL_SYMBOL__SYMBOL, + Fn_TRIM_TRAILING_CHARS__CLOB_CLOB__CLOB, + Fn_DATE_ADD_YEAR__INT32_DATE__DATE, + Fn_DATE_ADD_YEAR__INT64_DATE__DATE, + Fn_DATE_ADD_YEAR__INT_DATE__DATE, + Fn_DATE_ADD_YEAR__INT32_TIME__TIME, + Fn_DATE_ADD_YEAR__INT64_TIME__TIME, + Fn_DATE_ADD_YEAR__INT_TIME__TIME, + Fn_DATE_ADD_YEAR__INT32_TIMESTAMP__TIMESTAMP, + Fn_DATE_ADD_YEAR__INT64_TIMESTAMP__TIMESTAMP, + Fn_DATE_ADD_YEAR__INT_TIMESTAMP__TIMESTAMP, + Fn_DATE_ADD_MONTH__INT32_DATE__DATE, + Fn_DATE_ADD_MONTH__INT64_DATE__DATE, + Fn_DATE_ADD_MONTH__INT_DATE__DATE, + Fn_DATE_ADD_MONTH__INT32_TIME__TIME, + Fn_DATE_ADD_MONTH__INT64_TIME__TIME, + Fn_DATE_ADD_MONTH__INT_TIME__TIME, + Fn_DATE_ADD_MONTH__INT32_TIMESTAMP__TIMESTAMP, + Fn_DATE_ADD_MONTH__INT64_TIMESTAMP__TIMESTAMP, + Fn_DATE_ADD_MONTH__INT_TIMESTAMP__TIMESTAMP, + Fn_DATE_ADD_DAY__INT32_DATE__DATE, + Fn_DATE_ADD_DAY__INT64_DATE__DATE, + Fn_DATE_ADD_DAY__INT_DATE__DATE, + Fn_DATE_ADD_DAY__INT32_TIME__TIME, + Fn_DATE_ADD_DAY__INT64_TIME__TIME, + Fn_DATE_ADD_DAY__INT_TIME__TIME, + Fn_DATE_ADD_DAY__INT32_TIMESTAMP__TIMESTAMP, + Fn_DATE_ADD_DAY__INT64_TIMESTAMP__TIMESTAMP, + Fn_DATE_ADD_DAY__INT_TIMESTAMP__TIMESTAMP, + Fn_DATE_ADD_HOUR__INT32_DATE__DATE, + Fn_DATE_ADD_HOUR__INT64_DATE__DATE, + Fn_DATE_ADD_HOUR__INT_DATE__DATE, + Fn_DATE_ADD_HOUR__INT32_TIME__TIME, + Fn_DATE_ADD_HOUR__INT64_TIME__TIME, + Fn_DATE_ADD_HOUR__INT_TIME__TIME, + Fn_DATE_ADD_HOUR__INT32_TIMESTAMP__TIMESTAMP, + Fn_DATE_ADD_HOUR__INT64_TIMESTAMP__TIMESTAMP, + Fn_DATE_ADD_HOUR__INT_TIMESTAMP__TIMESTAMP, + Fn_DATE_ADD_MINUTE__INT32_DATE__DATE, + Fn_DATE_ADD_MINUTE__INT64_DATE__DATE, + Fn_DATE_ADD_MINUTE__INT_DATE__DATE, + Fn_DATE_ADD_MINUTE__INT32_TIME__TIME, + Fn_DATE_ADD_MINUTE__INT64_TIME__TIME, + Fn_DATE_ADD_MINUTE__INT_TIME__TIME, + Fn_DATE_ADD_MINUTE__INT32_TIMESTAMP__TIMESTAMP, + Fn_DATE_ADD_MINUTE__INT64_TIMESTAMP__TIMESTAMP, + Fn_DATE_ADD_MINUTE__INT_TIMESTAMP__TIMESTAMP, + Fn_DATE_ADD_SECOND__INT32_DATE__DATE, + Fn_DATE_ADD_SECOND__INT64_DATE__DATE, + Fn_DATE_ADD_SECOND__INT_DATE__DATE, + Fn_DATE_ADD_SECOND__INT32_TIME__TIME, + Fn_DATE_ADD_SECOND__INT64_TIME__TIME, + Fn_DATE_ADD_SECOND__INT_TIME__TIME, + Fn_DATE_ADD_SECOND__INT32_TIMESTAMP__TIMESTAMP, + Fn_DATE_ADD_SECOND__INT64_TIMESTAMP__TIMESTAMP, + Fn_DATE_ADD_SECOND__INT_TIMESTAMP__TIMESTAMP, + Fn_DATE_DIFF_YEAR__DATE_DATE__INT64, + Fn_DATE_DIFF_YEAR__TIME_TIME__INT64, + Fn_DATE_DIFF_YEAR__TIMESTAMP_TIMESTAMP__INT64, + Fn_DATE_DIFF_MONTH__DATE_DATE__INT64, + Fn_DATE_DIFF_MONTH__TIME_TIME__INT64, + Fn_DATE_DIFF_MONTH__TIMESTAMP_TIMESTAMP__INT64, + Fn_DATE_DIFF_DAY__DATE_DATE__INT64, + Fn_DATE_DIFF_DAY__TIME_TIME__INT64, + Fn_DATE_DIFF_DAY__TIMESTAMP_TIMESTAMP__INT64, + Fn_DATE_DIFF_HOUR__DATE_DATE__INT64, + Fn_DATE_DIFF_HOUR__TIME_TIME__INT64, + Fn_DATE_DIFF_HOUR__TIMESTAMP_TIMESTAMP__INT64, + Fn_DATE_DIFF_MINUTE__DATE_DATE__INT64, + Fn_DATE_DIFF_MINUTE__TIME_TIME__INT64, + Fn_DATE_DIFF_MINUTE__TIMESTAMP_TIMESTAMP__INT64, + Fn_DATE_DIFF_SECOND__DATE_DATE__INT64, + Fn_DATE_DIFF_SECOND__TIME_TIME__INT64, + Fn_DATE_DIFF_SECOND__TIMESTAMP_TIMESTAMP__INT64, + Fn_CURRENT_USER____STRING, + Fn_CURRENT_DATE____DATE + ) @JvmStatic - private val aggregations: List = SqlHeader.aggregations.map { - object : FnAggregation { - override val signature: FnSignature.Aggregation = it - override fun accumulator(): FnAggregation.Accumulator = error("${it.name} not implemented") - } - } + private val aggregations: List = listOf(Agg_EVERY__BOOL__BOOL, Agg_ANY__BOOL__BOOL, Agg_SOME__BOOL__BOOL, Agg_COUNT__ANY__INT32, Agg_COUNT_STAR____INT32, Agg_MIN__INT8__INT8, Agg_MIN__INT16__INT16, Agg_MIN__INT32__INT32, Agg_MIN__INT64__INT64, Agg_MIN__INT__INT, Agg_MIN__DECIMAL_ARBITRARY__DECIMAL_ARBITRARY, Agg_MIN__FLOAT32__FLOAT32, Agg_MIN__FLOAT64__FLOAT64, Agg_MAX__INT8__INT8, Agg_MAX__INT16__INT16, Agg_MAX__INT32__INT32, Agg_MAX__INT64__INT64, Agg_MAX__INT__INT, Agg_MAX__DECIMAL_ARBITRARY__DECIMAL_ARBITRARY, Agg_MAX__FLOAT32__FLOAT32, Agg_MAX__FLOAT64__FLOAT64, Agg_SUM__INT8__INT8, Agg_SUM__INT16__INT16, Agg_SUM__INT32__INT32, Agg_SUM__INT64__INT64, Agg_SUM__INT__INT, Agg_SUM__DECIMAL_ARBITRARY__DECIMAL_ARBITRARY, Agg_SUM__FLOAT32__FLOAT32, Agg_SUM__FLOAT64__FLOAT64, Agg_AVG__INT8__INT8, Agg_AVG__INT16__INT16, Agg_AVG__INT32__INT32, Agg_AVG__INT64__INT64, Agg_AVG__INT__INT, Agg_AVG__DECIMAL_ARBITRARY__DECIMAL_ARBITRARY, Agg_AVG__FLOAT32__FLOAT32, Agg_AVG__FLOAT64__FLOAT64) @JvmStatic val builtins: List = scalars + aggregations diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggAny.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggAny.kt new file mode 100644 index 0000000000..f5b5dc7f44 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggAny.kt @@ -0,0 +1,29 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.agg + +import org.partiql.spi.fn.FnAggregation +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_ANY__BOOL__BOOL : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "any", + returns = BOOL, + parameters = listOf( + FnParameter("value", BOOL), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation any not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggAvg.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggAvg.kt new file mode 100644 index 0000000000..62b145a73c --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggAvg.kt @@ -0,0 +1,155 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.agg + +import org.partiql.spi.fn.FnAggregation +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_AVG__INT8__INT8 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "avg", + returns = INT8, + parameters = listOf( + FnParameter("value", INT8), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation avg not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_AVG__INT16__INT16 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "avg", + returns = INT16, + parameters = listOf( + FnParameter("value", INT16), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation avg not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_AVG__INT32__INT32 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "avg", + returns = INT32, + parameters = listOf( + FnParameter("value", INT32), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation avg not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_AVG__INT64__INT64 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "avg", + returns = INT64, + parameters = listOf( + FnParameter("value", INT64), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation avg not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_AVG__INT__INT : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "avg", + returns = INT, + parameters = listOf( + FnParameter("value", INT), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation avg not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_AVG__DECIMAL_ARBITRARY__DECIMAL_ARBITRARY : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "avg", + returns = DECIMAL_ARBITRARY, + parameters = listOf( + FnParameter("value", DECIMAL_ARBITRARY), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation avg not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_AVG__FLOAT32__FLOAT32 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "avg", + returns = FLOAT32, + parameters = listOf( + FnParameter("value", FLOAT32), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation avg not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_AVG__FLOAT64__FLOAT64 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "avg", + returns = FLOAT64, + parameters = listOf( + FnParameter("value", FLOAT64), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation avg not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggCount.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggCount.kt new file mode 100644 index 0000000000..5b2cc0c730 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggCount.kt @@ -0,0 +1,29 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.agg + +import org.partiql.spi.fn.FnAggregation +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_COUNT__ANY__INT32 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "count", + returns = INT32, + parameters = listOf( + FnParameter("value", ANY), + ), + isNullable = false, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation count not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggCountStar.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggCountStar.kt new file mode 100644 index 0000000000..778d317d0f --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggCountStar.kt @@ -0,0 +1,26 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.agg + +import org.partiql.spi.fn.FnAggregation +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_COUNT_STAR____INT32 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "count_star", + returns = INT32, + parameters = listOf(), + isNullable = false, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation count_star not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggEvery.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggEvery.kt new file mode 100644 index 0000000000..a0d9da97b1 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggEvery.kt @@ -0,0 +1,29 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.agg + +import org.partiql.spi.fn.FnAggregation +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.BOOL + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_EVERY__BOOL__BOOL : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "every", + returns = BOOL, + parameters = listOf( + FnParameter("value", BOOL), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation every not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggMax.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggMax.kt new file mode 100644 index 0000000000..9ea6370b0c --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggMax.kt @@ -0,0 +1,155 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.agg + +import org.partiql.spi.fn.FnAggregation +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_MAX__INT8__INT8 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "max", + returns = INT8, + parameters = listOf( + FnParameter("value", INT8), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation max not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_MAX__INT16__INT16 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "max", + returns = INT16, + parameters = listOf( + FnParameter("value", INT16), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation max not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_MAX__INT32__INT32 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "max", + returns = INT32, + parameters = listOf( + FnParameter("value", INT32), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation max not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_MAX__INT64__INT64 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "max", + returns = INT64, + parameters = listOf( + FnParameter("value", INT64), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation max not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_MAX__INT__INT : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "max", + returns = INT, + parameters = listOf( + FnParameter("value", INT), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation max not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_MAX__DECIMAL_ARBITRARY__DECIMAL_ARBITRARY : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "max", + returns = DECIMAL_ARBITRARY, + parameters = listOf( + FnParameter("value", DECIMAL_ARBITRARY), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation max not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_MAX__FLOAT32__FLOAT32 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "max", + returns = FLOAT32, + parameters = listOf( + FnParameter("value", FLOAT32), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation max not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_MAX__FLOAT64__FLOAT64 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "max", + returns = FLOAT64, + parameters = listOf( + FnParameter("value", FLOAT64), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation max not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggMin.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggMin.kt new file mode 100644 index 0000000000..efe6ec28d1 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggMin.kt @@ -0,0 +1,155 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.agg + +import org.partiql.spi.fn.FnAggregation +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_MIN__INT8__INT8 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "min", + returns = INT8, + parameters = listOf( + FnParameter("value", INT8), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation min not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_MIN__INT16__INT16 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "min", + returns = INT16, + parameters = listOf( + FnParameter("value", INT16), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation min not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_MIN__INT32__INT32 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "min", + returns = INT32, + parameters = listOf( + FnParameter("value", INT32), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation min not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_MIN__INT64__INT64 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "min", + returns = INT64, + parameters = listOf( + FnParameter("value", INT64), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation min not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_MIN__INT__INT : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "min", + returns = INT, + parameters = listOf( + FnParameter("value", INT), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation min not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_MIN__DECIMAL_ARBITRARY__DECIMAL_ARBITRARY : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "min", + returns = DECIMAL_ARBITRARY, + parameters = listOf( + FnParameter("value", DECIMAL_ARBITRARY), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation min not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_MIN__FLOAT32__FLOAT32 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "min", + returns = FLOAT32, + parameters = listOf( + FnParameter("value", FLOAT32), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation min not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_MIN__FLOAT64__FLOAT64 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "min", + returns = FLOAT64, + parameters = listOf( + FnParameter("value", FLOAT64), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation min not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggSome.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggSome.kt new file mode 100644 index 0000000000..8322e2c3d5 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggSome.kt @@ -0,0 +1,29 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.agg + +import org.partiql.spi.fn.FnAggregation +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.BOOL + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_SOME__BOOL__BOOL : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "some", + returns = BOOL, + parameters = listOf( + FnParameter("value", BOOL), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation some not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggSum.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggSum.kt new file mode 100644 index 0000000000..abbd131c51 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg/AggSum.kt @@ -0,0 +1,155 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.agg + +import org.partiql.spi.fn.FnAggregation +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_SUM__INT8__INT8 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "sum", + returns = INT8, + parameters = listOf( + FnParameter("value", INT8), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation sum not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_SUM__INT16__INT16 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "sum", + returns = INT16, + parameters = listOf( + FnParameter("value", INT16), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation sum not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_SUM__INT32__INT32 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "sum", + returns = INT32, + parameters = listOf( + FnParameter("value", INT32), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation sum not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_SUM__INT64__INT64 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "sum", + returns = INT64, + parameters = listOf( + FnParameter("value", INT64), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation sum not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_SUM__INT__INT : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "sum", + returns = INT, + parameters = listOf( + FnParameter("value", INT), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation sum not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_SUM__DECIMAL_ARBITRARY__DECIMAL_ARBITRARY : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "sum", + returns = DECIMAL_ARBITRARY, + parameters = listOf( + FnParameter("value", DECIMAL_ARBITRARY), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation sum not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_SUM__FLOAT32__FLOAT32 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "sum", + returns = FLOAT32, + parameters = listOf( + FnParameter("value", FLOAT32), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation sum not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Agg_SUM__FLOAT64__FLOAT64 : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "sum", + returns = FLOAT64, + parameters = listOf( + FnParameter("value", FLOAT64), + ), + isNullable = true, + isDecomposable = true + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation sum not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnAnd.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnAnd.kt new file mode 100644 index 0000000000..77bf9dccf5 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnAnd.kt @@ -0,0 +1,89 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.BOOL +import org.partiql.value.PartiQLValueType.MISSING + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_AND__BOOL_BOOL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "and", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", BOOL), + FnParameter("rhs", BOOL), + ), + isNullCall = false, + isNullable = true, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function and not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_AND__MISSING_BOOL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "and", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", MISSING), + FnParameter("rhs", BOOL), + ), + isNullCall = false, + isNullable = true, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function and not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_AND__BOOL_MISSING__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "and", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", BOOL), + FnParameter("rhs", MISSING), + ), + isNullCall = false, + isNullable = true, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function and not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_AND__MISSING_MISSING__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "and", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", MISSING), + FnParameter("rhs", MISSING), + ), + isNullCall = false, + isNullable = true, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function and not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnBetween.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnBetween.kt new file mode 100644 index 0000000000..e78265befd --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnBetween.kt @@ -0,0 +1,292 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BETWEEN__INT8_INT8_INT8__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "between", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT8), + FnParameter("lower", INT8), + FnParameter("upper", INT8), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function between not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BETWEEN__INT16_INT16_INT16__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "between", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT16), + FnParameter("lower", INT16), + FnParameter("upper", INT16), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function between not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BETWEEN__INT32_INT32_INT32__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "between", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT32), + FnParameter("lower", INT32), + FnParameter("upper", INT32), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function between not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BETWEEN__INT64_INT64_INT64__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "between", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT64), + FnParameter("lower", INT64), + FnParameter("upper", INT64), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function between not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BETWEEN__INT_INT_INT__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "between", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT), + FnParameter("lower", INT), + FnParameter("upper", INT), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function between not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BETWEEN__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "between", + returns = BOOL, + parameters = listOf( + FnParameter("value", DECIMAL_ARBITRARY), + FnParameter("lower", DECIMAL_ARBITRARY), + FnParameter("upper", DECIMAL_ARBITRARY), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function between not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BETWEEN__FLOAT32_FLOAT32_FLOAT32__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "between", + returns = BOOL, + parameters = listOf( + FnParameter("value", FLOAT32), + FnParameter("lower", FLOAT32), + FnParameter("upper", FLOAT32), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function between not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BETWEEN__FLOAT64_FLOAT64_FLOAT64__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "between", + returns = BOOL, + parameters = listOf( + FnParameter("value", FLOAT64), + FnParameter("lower", FLOAT64), + FnParameter("upper", FLOAT64), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function between not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BETWEEN__STRING_STRING_STRING__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "between", + returns = BOOL, + parameters = listOf( + FnParameter("value", STRING), + FnParameter("lower", STRING), + FnParameter("upper", STRING), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function between not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BETWEEN__SYMBOL_SYMBOL_SYMBOL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "between", + returns = BOOL, + parameters = listOf( + FnParameter("value", SYMBOL), + FnParameter("lower", SYMBOL), + FnParameter("upper", SYMBOL), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function between not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BETWEEN__CLOB_CLOB_CLOB__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "between", + returns = BOOL, + parameters = listOf( + FnParameter("value", CLOB), + FnParameter("lower", CLOB), + FnParameter("upper", CLOB), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function between not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BETWEEN__DATE_DATE_DATE__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "between", + returns = BOOL, + parameters = listOf( + FnParameter("value", DATE), + FnParameter("lower", DATE), + FnParameter("upper", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function between not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BETWEEN__TIME_TIME_TIME__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "between", + returns = BOOL, + parameters = listOf( + FnParameter("value", TIME), + FnParameter("lower", TIME), + FnParameter("upper", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function between not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BETWEEN__TIMESTAMP_TIMESTAMP_TIMESTAMP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "between", + returns = BOOL, + parameters = listOf( + FnParameter("value", TIMESTAMP), + FnParameter("lower", TIMESTAMP), + FnParameter("upper", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function between not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnBitwiseAnd.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnBitwiseAnd.kt new file mode 100644 index 0000000000..1769f26d85 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnBitwiseAnd.kt @@ -0,0 +1,107 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BITWISE_AND__INT8_INT8__INT8 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "bitwise_and", + returns = INT8, + parameters = listOf( + FnParameter("lhs", INT8), + FnParameter("rhs", INT8), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function bitwise_and not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BITWISE_AND__INT16_INT16__INT16 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "bitwise_and", + returns = INT16, + parameters = listOf( + FnParameter("lhs", INT16), + FnParameter("rhs", INT16), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function bitwise_and not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BITWISE_AND__INT32_INT32__INT32 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "bitwise_and", + returns = INT32, + parameters = listOf( + FnParameter("lhs", INT32), + FnParameter("rhs", INT32), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function bitwise_and not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BITWISE_AND__INT64_INT64__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "bitwise_and", + returns = INT64, + parameters = listOf( + FnParameter("lhs", INT64), + FnParameter("rhs", INT64), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function bitwise_and not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_BITWISE_AND__INT_INT__INT : FnScalar { + + override val signature = FnSignature.Scalar( + name = "bitwise_and", + returns = INT, + parameters = listOf( + FnParameter("lhs", INT), + FnParameter("rhs", INT), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function bitwise_and not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnConcat.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnConcat.kt new file mode 100644 index 0000000000..9036e6eefa --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnConcat.kt @@ -0,0 +1,69 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_CONCAT__STRING_STRING__STRING : FnScalar { + + override val signature = FnSignature.Scalar( + name = "concat", + returns = STRING, + parameters = listOf( + FnParameter("lhs", STRING), + FnParameter("rhs", STRING), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function concat not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_CONCAT__SYMBOL_SYMBOL__SYMBOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "concat", + returns = SYMBOL, + parameters = listOf( + FnParameter("lhs", SYMBOL), + FnParameter("rhs", SYMBOL), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function concat not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_CONCAT__CLOB_CLOB__CLOB : FnScalar { + + override val signature = FnSignature.Scalar( + name = "concat", + returns = CLOB, + parameters = listOf( + FnParameter("lhs", CLOB), + FnParameter("rhs", CLOB), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function concat not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnCurrentDate.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnCurrentDate.kt new file mode 100644 index 0000000000..debd201a1c --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnCurrentDate.kt @@ -0,0 +1,27 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.DATE + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_CURRENT_DATE____DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "current_date", + returns = DATE, + parameters = listOf(), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function current_date not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnCurrentUser.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnCurrentUser.kt new file mode 100644 index 0000000000..6935cfea1e --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnCurrentUser.kt @@ -0,0 +1,27 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.STRING + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_CURRENT_USER____STRING : FnScalar { + + override val signature = FnSignature.Scalar( + name = "current_user", + returns = STRING, + parameters = listOf(), + isNullCall = false, + isNullable = true, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function current_user not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateAddDay.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateAddDay.kt new file mode 100644 index 0000000000..8d7feda4b9 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateAddDay.kt @@ -0,0 +1,183 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_DAY__INT32_DATE__DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_day", + returns = DATE, + parameters = listOf( + FnParameter("interval", INT32), + FnParameter("datetime", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_day not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_DAY__INT64_DATE__DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_day", + returns = DATE, + parameters = listOf( + FnParameter("interval", INT64), + FnParameter("datetime", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_day not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_DAY__INT_DATE__DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_day", + returns = DATE, + parameters = listOf( + FnParameter("interval", INT), + FnParameter("datetime", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_day not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_DAY__INT32_TIME__TIME : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_day", + returns = TIME, + parameters = listOf( + FnParameter("interval", INT32), + FnParameter("datetime", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_day not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_DAY__INT64_TIME__TIME : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_day", + returns = TIME, + parameters = listOf( + FnParameter("interval", INT64), + FnParameter("datetime", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_day not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_DAY__INT_TIME__TIME : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_day", + returns = TIME, + parameters = listOf( + FnParameter("interval", INT), + FnParameter("datetime", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_day not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_DAY__INT32_TIMESTAMP__TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_day", + returns = TIMESTAMP, + parameters = listOf( + FnParameter("interval", INT32), + FnParameter("datetime", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_day not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_DAY__INT64_TIMESTAMP__TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_day", + returns = TIMESTAMP, + parameters = listOf( + FnParameter("interval", INT64), + FnParameter("datetime", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_day not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_DAY__INT_TIMESTAMP__TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_day", + returns = TIMESTAMP, + parameters = listOf( + FnParameter("interval", INT), + FnParameter("datetime", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_day not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateAddHour.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateAddHour.kt new file mode 100644 index 0000000000..b1b339c58f --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateAddHour.kt @@ -0,0 +1,183 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_HOUR__INT32_DATE__DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_hour", + returns = DATE, + parameters = listOf( + FnParameter("interval", INT32), + FnParameter("datetime", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_hour not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_HOUR__INT64_DATE__DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_hour", + returns = DATE, + parameters = listOf( + FnParameter("interval", INT64), + FnParameter("datetime", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_hour not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_HOUR__INT_DATE__DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_hour", + returns = DATE, + parameters = listOf( + FnParameter("interval", INT), + FnParameter("datetime", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_hour not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_HOUR__INT32_TIME__TIME : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_hour", + returns = TIME, + parameters = listOf( + FnParameter("interval", INT32), + FnParameter("datetime", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_hour not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_HOUR__INT64_TIME__TIME : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_hour", + returns = TIME, + parameters = listOf( + FnParameter("interval", INT64), + FnParameter("datetime", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_hour not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_HOUR__INT_TIME__TIME : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_hour", + returns = TIME, + parameters = listOf( + FnParameter("interval", INT), + FnParameter("datetime", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_hour not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_HOUR__INT32_TIMESTAMP__TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_hour", + returns = TIMESTAMP, + parameters = listOf( + FnParameter("interval", INT32), + FnParameter("datetime", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_hour not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_HOUR__INT64_TIMESTAMP__TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_hour", + returns = TIMESTAMP, + parameters = listOf( + FnParameter("interval", INT64), + FnParameter("datetime", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_hour not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_HOUR__INT_TIMESTAMP__TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_hour", + returns = TIMESTAMP, + parameters = listOf( + FnParameter("interval", INT), + FnParameter("datetime", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_hour not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateAddMinute.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateAddMinute.kt new file mode 100644 index 0000000000..257f680e07 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateAddMinute.kt @@ -0,0 +1,183 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_MINUTE__INT32_DATE__DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_minute", + returns = DATE, + parameters = listOf( + FnParameter("interval", INT32), + FnParameter("datetime", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_minute not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_MINUTE__INT64_DATE__DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_minute", + returns = DATE, + parameters = listOf( + FnParameter("interval", INT64), + FnParameter("datetime", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_minute not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_MINUTE__INT_DATE__DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_minute", + returns = DATE, + parameters = listOf( + FnParameter("interval", INT), + FnParameter("datetime", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_minute not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_MINUTE__INT32_TIME__TIME : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_minute", + returns = TIME, + parameters = listOf( + FnParameter("interval", INT32), + FnParameter("datetime", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_minute not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_MINUTE__INT64_TIME__TIME : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_minute", + returns = TIME, + parameters = listOf( + FnParameter("interval", INT64), + FnParameter("datetime", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_minute not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_MINUTE__INT_TIME__TIME : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_minute", + returns = TIME, + parameters = listOf( + FnParameter("interval", INT), + FnParameter("datetime", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_minute not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_MINUTE__INT32_TIMESTAMP__TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_minute", + returns = TIMESTAMP, + parameters = listOf( + FnParameter("interval", INT32), + FnParameter("datetime", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_minute not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_MINUTE__INT64_TIMESTAMP__TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_minute", + returns = TIMESTAMP, + parameters = listOf( + FnParameter("interval", INT64), + FnParameter("datetime", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_minute not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_MINUTE__INT_TIMESTAMP__TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_minute", + returns = TIMESTAMP, + parameters = listOf( + FnParameter("interval", INT), + FnParameter("datetime", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_minute not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateAddMonth.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateAddMonth.kt new file mode 100644 index 0000000000..100e7bb576 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateAddMonth.kt @@ -0,0 +1,183 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_MONTH__INT32_DATE__DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_month", + returns = DATE, + parameters = listOf( + FnParameter("interval", INT32), + FnParameter("datetime", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_month not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_MONTH__INT64_DATE__DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_month", + returns = DATE, + parameters = listOf( + FnParameter("interval", INT64), + FnParameter("datetime", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_month not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_MONTH__INT_DATE__DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_month", + returns = DATE, + parameters = listOf( + FnParameter("interval", INT), + FnParameter("datetime", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_month not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_MONTH__INT32_TIME__TIME : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_month", + returns = TIME, + parameters = listOf( + FnParameter("interval", INT32), + FnParameter("datetime", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_month not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_MONTH__INT64_TIME__TIME : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_month", + returns = TIME, + parameters = listOf( + FnParameter("interval", INT64), + FnParameter("datetime", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_month not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_MONTH__INT_TIME__TIME : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_month", + returns = TIME, + parameters = listOf( + FnParameter("interval", INT), + FnParameter("datetime", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_month not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_MONTH__INT32_TIMESTAMP__TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_month", + returns = TIMESTAMP, + parameters = listOf( + FnParameter("interval", INT32), + FnParameter("datetime", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_month not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_MONTH__INT64_TIMESTAMP__TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_month", + returns = TIMESTAMP, + parameters = listOf( + FnParameter("interval", INT64), + FnParameter("datetime", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_month not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_MONTH__INT_TIMESTAMP__TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_month", + returns = TIMESTAMP, + parameters = listOf( + FnParameter("interval", INT), + FnParameter("datetime", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_month not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateAddSecond.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateAddSecond.kt new file mode 100644 index 0000000000..c47408b4fd --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateAddSecond.kt @@ -0,0 +1,183 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_SECOND__INT32_DATE__DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_second", + returns = DATE, + parameters = listOf( + FnParameter("interval", INT32), + FnParameter("datetime", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_second not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_SECOND__INT64_DATE__DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_second", + returns = DATE, + parameters = listOf( + FnParameter("interval", INT64), + FnParameter("datetime", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_second not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_SECOND__INT_DATE__DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_second", + returns = DATE, + parameters = listOf( + FnParameter("interval", INT), + FnParameter("datetime", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_second not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_SECOND__INT32_TIME__TIME : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_second", + returns = TIME, + parameters = listOf( + FnParameter("interval", INT32), + FnParameter("datetime", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_second not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_SECOND__INT64_TIME__TIME : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_second", + returns = TIME, + parameters = listOf( + FnParameter("interval", INT64), + FnParameter("datetime", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_second not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_SECOND__INT_TIME__TIME : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_second", + returns = TIME, + parameters = listOf( + FnParameter("interval", INT), + FnParameter("datetime", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_second not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_SECOND__INT32_TIMESTAMP__TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_second", + returns = TIMESTAMP, + parameters = listOf( + FnParameter("interval", INT32), + FnParameter("datetime", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_second not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_SECOND__INT64_TIMESTAMP__TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_second", + returns = TIMESTAMP, + parameters = listOf( + FnParameter("interval", INT64), + FnParameter("datetime", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_second not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_SECOND__INT_TIMESTAMP__TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_second", + returns = TIMESTAMP, + parameters = listOf( + FnParameter("interval", INT), + FnParameter("datetime", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_second not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateAddYear.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateAddYear.kt new file mode 100644 index 0000000000..e00c7e9fe8 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateAddYear.kt @@ -0,0 +1,183 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_YEAR__INT32_DATE__DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_year", + returns = DATE, + parameters = listOf( + FnParameter("interval", INT32), + FnParameter("datetime", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_year not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_YEAR__INT64_DATE__DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_year", + returns = DATE, + parameters = listOf( + FnParameter("interval", INT64), + FnParameter("datetime", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_year not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_YEAR__INT_DATE__DATE : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_year", + returns = DATE, + parameters = listOf( + FnParameter("interval", INT), + FnParameter("datetime", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_year not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_YEAR__INT32_TIME__TIME : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_year", + returns = TIME, + parameters = listOf( + FnParameter("interval", INT32), + FnParameter("datetime", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_year not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_YEAR__INT64_TIME__TIME : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_year", + returns = TIME, + parameters = listOf( + FnParameter("interval", INT64), + FnParameter("datetime", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_year not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_YEAR__INT_TIME__TIME : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_year", + returns = TIME, + parameters = listOf( + FnParameter("interval", INT), + FnParameter("datetime", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_year not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_YEAR__INT32_TIMESTAMP__TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_year", + returns = TIMESTAMP, + parameters = listOf( + FnParameter("interval", INT32), + FnParameter("datetime", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_year not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_YEAR__INT64_TIMESTAMP__TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_year", + returns = TIMESTAMP, + parameters = listOf( + FnParameter("interval", INT64), + FnParameter("datetime", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_year not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_ADD_YEAR__INT_TIMESTAMP__TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_add_year", + returns = TIMESTAMP, + parameters = listOf( + FnParameter("interval", INT), + FnParameter("datetime", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_add_year not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateDiffDay.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateDiffDay.kt new file mode 100644 index 0000000000..878fb1fe55 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateDiffDay.kt @@ -0,0 +1,69 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_DIFF_DAY__DATE_DATE__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_diff_day", + returns = INT64, + parameters = listOf( + FnParameter("datetime1", DATE), + FnParameter("datetime2", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_diff_day not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_DIFF_DAY__TIME_TIME__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_diff_day", + returns = INT64, + parameters = listOf( + FnParameter("datetime1", TIME), + FnParameter("datetime2", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_diff_day not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_DIFF_DAY__TIMESTAMP_TIMESTAMP__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_diff_day", + returns = INT64, + parameters = listOf( + FnParameter("datetime1", TIMESTAMP), + FnParameter("datetime2", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_diff_day not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateDiffHour.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateDiffHour.kt new file mode 100644 index 0000000000..95af527af5 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateDiffHour.kt @@ -0,0 +1,69 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_DIFF_HOUR__DATE_DATE__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_diff_hour", + returns = INT64, + parameters = listOf( + FnParameter("datetime1", DATE), + FnParameter("datetime2", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_diff_hour not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_DIFF_HOUR__TIME_TIME__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_diff_hour", + returns = INT64, + parameters = listOf( + FnParameter("datetime1", TIME), + FnParameter("datetime2", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_diff_hour not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_DIFF_HOUR__TIMESTAMP_TIMESTAMP__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_diff_hour", + returns = INT64, + parameters = listOf( + FnParameter("datetime1", TIMESTAMP), + FnParameter("datetime2", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_diff_hour not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateDiffMinute.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateDiffMinute.kt new file mode 100644 index 0000000000..e19d40ee88 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateDiffMinute.kt @@ -0,0 +1,69 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_DIFF_MINUTE__DATE_DATE__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_diff_minute", + returns = INT64, + parameters = listOf( + FnParameter("datetime1", DATE), + FnParameter("datetime2", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_diff_minute not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_DIFF_MINUTE__TIME_TIME__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_diff_minute", + returns = INT64, + parameters = listOf( + FnParameter("datetime1", TIME), + FnParameter("datetime2", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_diff_minute not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_DIFF_MINUTE__TIMESTAMP_TIMESTAMP__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_diff_minute", + returns = INT64, + parameters = listOf( + FnParameter("datetime1", TIMESTAMP), + FnParameter("datetime2", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_diff_minute not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateDiffMonth.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateDiffMonth.kt new file mode 100644 index 0000000000..45beed37e4 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateDiffMonth.kt @@ -0,0 +1,69 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_DIFF_MONTH__DATE_DATE__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_diff_month", + returns = INT64, + parameters = listOf( + FnParameter("datetime1", DATE), + FnParameter("datetime2", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_diff_month not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_DIFF_MONTH__TIME_TIME__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_diff_month", + returns = INT64, + parameters = listOf( + FnParameter("datetime1", TIME), + FnParameter("datetime2", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_diff_month not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_DIFF_MONTH__TIMESTAMP_TIMESTAMP__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_diff_month", + returns = INT64, + parameters = listOf( + FnParameter("datetime1", TIMESTAMP), + FnParameter("datetime2", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_diff_month not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateDiffSecond.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateDiffSecond.kt new file mode 100644 index 0000000000..ea671010dd --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateDiffSecond.kt @@ -0,0 +1,69 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_DIFF_SECOND__DATE_DATE__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_diff_second", + returns = INT64, + parameters = listOf( + FnParameter("datetime1", DATE), + FnParameter("datetime2", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_diff_second not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_DIFF_SECOND__TIME_TIME__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_diff_second", + returns = INT64, + parameters = listOf( + FnParameter("datetime1", TIME), + FnParameter("datetime2", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_diff_second not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_DIFF_SECOND__TIMESTAMP_TIMESTAMP__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_diff_second", + returns = INT64, + parameters = listOf( + FnParameter("datetime1", TIMESTAMP), + FnParameter("datetime2", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_diff_second not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateDiffYear.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateDiffYear.kt new file mode 100644 index 0000000000..f90008f148 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDateDiffYear.kt @@ -0,0 +1,69 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_DIFF_YEAR__DATE_DATE__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_diff_year", + returns = INT64, + parameters = listOf( + FnParameter("datetime1", DATE), + FnParameter("datetime2", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_diff_year not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_DIFF_YEAR__TIME_TIME__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_diff_year", + returns = INT64, + parameters = listOf( + FnParameter("datetime1", TIME), + FnParameter("datetime2", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_diff_year not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DATE_DIFF_YEAR__TIMESTAMP_TIMESTAMP__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "date_diff_year", + returns = INT64, + parameters = listOf( + FnParameter("datetime1", TIMESTAMP), + FnParameter("datetime2", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function date_diff_year not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDivide.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDivide.kt new file mode 100644 index 0000000000..42006b2fc2 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnDivide.kt @@ -0,0 +1,164 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DIVIDE__INT8_INT8__INT8 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "divide", + returns = INT8, + parameters = listOf( + FnParameter("lhs", INT8), + FnParameter("rhs", INT8), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function divide not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DIVIDE__INT16_INT16__INT16 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "divide", + returns = INT16, + parameters = listOf( + FnParameter("lhs", INT16), + FnParameter("rhs", INT16), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function divide not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DIVIDE__INT32_INT32__INT32 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "divide", + returns = INT32, + parameters = listOf( + FnParameter("lhs", INT32), + FnParameter("rhs", INT32), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function divide not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DIVIDE__INT64_INT64__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "divide", + returns = INT64, + parameters = listOf( + FnParameter("lhs", INT64), + FnParameter("rhs", INT64), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function divide not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DIVIDE__INT_INT__INT : FnScalar { + + override val signature = FnSignature.Scalar( + name = "divide", + returns = INT, + parameters = listOf( + FnParameter("lhs", INT), + FnParameter("rhs", INT), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function divide not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DIVIDE__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__DECIMAL_ARBITRARY : FnScalar { + + override val signature = FnSignature.Scalar( + name = "divide", + returns = DECIMAL_ARBITRARY, + parameters = listOf( + FnParameter("lhs", DECIMAL_ARBITRARY), + FnParameter("rhs", DECIMAL_ARBITRARY), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function divide not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DIVIDE__FLOAT32_FLOAT32__FLOAT32 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "divide", + returns = FLOAT32, + parameters = listOf( + FnParameter("lhs", FLOAT32), + FnParameter("rhs", FLOAT32), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function divide not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_DIVIDE__FLOAT64_FLOAT64__FLOAT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "divide", + returns = FLOAT64, + parameters = listOf( + FnParameter("lhs", FLOAT64), + FnParameter("rhs", FLOAT64), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function divide not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnEq.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnEq.kt new file mode 100644 index 0000000000..493c454621 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnEq.kt @@ -0,0 +1,544 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__ANY_ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", ANY), + FnParameter("rhs", ANY), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__BOOL_BOOL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", BOOL), + FnParameter("rhs", BOOL), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__INT8_INT8__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", INT8), + FnParameter("rhs", INT8), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__INT16_INT16__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", INT16), + FnParameter("rhs", INT16), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__INT32_INT32__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", INT32), + FnParameter("rhs", INT32), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__INT64_INT64__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", INT64), + FnParameter("rhs", INT64), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__INT_INT__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", INT), + FnParameter("rhs", INT), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__DECIMAL_DECIMAL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", DECIMAL), + FnParameter("rhs", DECIMAL), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", DECIMAL_ARBITRARY), + FnParameter("rhs", DECIMAL_ARBITRARY), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__FLOAT32_FLOAT32__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", FLOAT32), + FnParameter("rhs", FLOAT32), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__FLOAT64_FLOAT64__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", FLOAT64), + FnParameter("rhs", FLOAT64), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__CHAR_CHAR__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", CHAR), + FnParameter("rhs", CHAR), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__STRING_STRING__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", STRING), + FnParameter("rhs", STRING), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__SYMBOL_SYMBOL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", SYMBOL), + FnParameter("rhs", SYMBOL), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__BINARY_BINARY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", BINARY), + FnParameter("rhs", BINARY), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__BYTE_BYTE__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", BYTE), + FnParameter("rhs", BYTE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__BLOB_BLOB__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", BLOB), + FnParameter("rhs", BLOB), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__CLOB_CLOB__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", CLOB), + FnParameter("rhs", CLOB), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__DATE_DATE__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", DATE), + FnParameter("rhs", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__TIME_TIME__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", TIME), + FnParameter("rhs", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__TIMESTAMP_TIMESTAMP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", TIMESTAMP), + FnParameter("rhs", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__INTERVAL_INTERVAL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", INTERVAL), + FnParameter("rhs", INTERVAL), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__BAG_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", BAG), + FnParameter("rhs", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__LIST_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", LIST), + FnParameter("rhs", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__SEXP_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", SEXP), + FnParameter("rhs", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__STRUCT_STRUCT__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", STRUCT), + FnParameter("rhs", STRUCT), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__NULL_NULL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", NULL), + FnParameter("rhs", NULL), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_EQ__MISSING_MISSING__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "eq", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", MISSING), + FnParameter("rhs", MISSING), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function eq not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnGt.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnGt.kt new file mode 100644 index 0000000000..2a826df107 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnGt.kt @@ -0,0 +1,297 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GT__INT8_INT8__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gt", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", INT8), + FnParameter("rhs", INT8), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gt not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GT__INT16_INT16__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gt", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", INT16), + FnParameter("rhs", INT16), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gt not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GT__INT32_INT32__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gt", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", INT32), + FnParameter("rhs", INT32), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gt not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GT__INT64_INT64__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gt", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", INT64), + FnParameter("rhs", INT64), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gt not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GT__INT_INT__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gt", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", INT), + FnParameter("rhs", INT), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gt not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GT__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gt", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", DECIMAL_ARBITRARY), + FnParameter("rhs", DECIMAL_ARBITRARY), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gt not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GT__FLOAT32_FLOAT32__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gt", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", FLOAT32), + FnParameter("rhs", FLOAT32), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gt not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GT__FLOAT64_FLOAT64__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gt", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", FLOAT64), + FnParameter("rhs", FLOAT64), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gt not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GT__STRING_STRING__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gt", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", STRING), + FnParameter("rhs", STRING), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gt not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GT__SYMBOL_SYMBOL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gt", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", SYMBOL), + FnParameter("rhs", SYMBOL), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gt not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GT__CLOB_CLOB__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gt", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", CLOB), + FnParameter("rhs", CLOB), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gt not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GT__DATE_DATE__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gt", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", DATE), + FnParameter("rhs", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gt not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GT__TIME_TIME__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gt", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", TIME), + FnParameter("rhs", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gt not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GT__TIMESTAMP_TIMESTAMP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gt", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", TIMESTAMP), + FnParameter("rhs", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gt not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GT__BOOL_BOOL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gt", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", BOOL), + FnParameter("rhs", BOOL), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gt not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnGte.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnGte.kt new file mode 100644 index 0000000000..f4e0e52e32 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnGte.kt @@ -0,0 +1,297 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GTE__INT8_INT8__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gte", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", INT8), + FnParameter("rhs", INT8), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gte not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GTE__INT16_INT16__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gte", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", INT16), + FnParameter("rhs", INT16), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gte not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GTE__INT32_INT32__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gte", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", INT32), + FnParameter("rhs", INT32), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gte not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GTE__INT64_INT64__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gte", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", INT64), + FnParameter("rhs", INT64), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gte not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GTE__INT_INT__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gte", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", INT), + FnParameter("rhs", INT), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gte not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GTE__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gte", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", DECIMAL_ARBITRARY), + FnParameter("rhs", DECIMAL_ARBITRARY), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gte not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GTE__FLOAT32_FLOAT32__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gte", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", FLOAT32), + FnParameter("rhs", FLOAT32), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gte not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GTE__FLOAT64_FLOAT64__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gte", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", FLOAT64), + FnParameter("rhs", FLOAT64), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gte not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GTE__STRING_STRING__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gte", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", STRING), + FnParameter("rhs", STRING), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gte not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GTE__SYMBOL_SYMBOL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gte", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", SYMBOL), + FnParameter("rhs", SYMBOL), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gte not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GTE__CLOB_CLOB__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gte", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", CLOB), + FnParameter("rhs", CLOB), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gte not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GTE__DATE_DATE__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gte", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", DATE), + FnParameter("rhs", DATE), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gte not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GTE__TIME_TIME__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gte", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", TIME), + FnParameter("rhs", TIME), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gte not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GTE__TIMESTAMP_TIMESTAMP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gte", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", TIMESTAMP), + FnParameter("rhs", TIMESTAMP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gte not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_GTE__BOOL_BOOL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "gte", + returns = BOOL, + parameters = listOf( + FnParameter("lhs", BOOL), + FnParameter("rhs", BOOL), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function gte not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnInCollection.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnInCollection.kt new file mode 100644 index 0000000000..6245ab7190 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnInCollection.kt @@ -0,0 +1,1608 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__ANY_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", ANY), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__ANY_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", ANY), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__ANY_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", ANY), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__BOOL_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", BOOL), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__BOOL_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", BOOL), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__BOOL_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", BOOL), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__INT8_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT8), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__INT8_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT8), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__INT8_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT8), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__INT16_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT16), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__INT16_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT16), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__INT16_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT16), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__INT32_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT32), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__INT32_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT32), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__INT32_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT32), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__INT64_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT64), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__INT64_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT64), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__INT64_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT64), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__INT_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__INT_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__INT_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", INT), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__DECIMAL_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", DECIMAL), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__DECIMAL_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", DECIMAL), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__DECIMAL_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", DECIMAL), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__DECIMAL_ARBITRARY_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", DECIMAL_ARBITRARY), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__DECIMAL_ARBITRARY_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", DECIMAL_ARBITRARY), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__DECIMAL_ARBITRARY_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", DECIMAL_ARBITRARY), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__FLOAT32_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", FLOAT32), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__FLOAT32_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", FLOAT32), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__FLOAT32_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", FLOAT32), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__FLOAT64_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", FLOAT64), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__FLOAT64_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", FLOAT64), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__FLOAT64_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", FLOAT64), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__CHAR_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", CHAR), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__CHAR_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", CHAR), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__CHAR_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", CHAR), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__STRING_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", STRING), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__STRING_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", STRING), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__STRING_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", STRING), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__SYMBOL_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", SYMBOL), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__SYMBOL_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", SYMBOL), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__SYMBOL_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", SYMBOL), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__BINARY_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", BINARY), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__BINARY_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", BINARY), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__BINARY_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", BINARY), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__BYTE_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", BYTE), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__BYTE_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", BYTE), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__BYTE_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", BYTE), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__BLOB_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", BLOB), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__BLOB_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", BLOB), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__BLOB_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", BLOB), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__CLOB_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", CLOB), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__CLOB_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", CLOB), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__CLOB_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", CLOB), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__DATE_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", DATE), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__DATE_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", DATE), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__DATE_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", DATE), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__TIME_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", TIME), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__TIME_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", TIME), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__TIME_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", TIME), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__TIMESTAMP_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", TIMESTAMP), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__TIMESTAMP_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", TIMESTAMP), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__TIMESTAMP_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", TIMESTAMP), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__INTERVAL_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", INTERVAL), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__INTERVAL_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", INTERVAL), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__INTERVAL_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", INTERVAL), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__BAG_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", BAG), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__BAG_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", BAG), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__BAG_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", BAG), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__LIST_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", LIST), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__LIST_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", LIST), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__LIST_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", LIST), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__SEXP_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", SEXP), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__SEXP_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", SEXP), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__SEXP_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", SEXP), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__STRUCT_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", STRUCT), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__STRUCT_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", STRUCT), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__STRUCT_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", STRUCT), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__NULL_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", NULL), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__NULL_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", NULL), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__NULL_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", NULL), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__MISSING_BAG__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", MISSING), + FnParameter("collection", BAG), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__MISSING_LIST__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", MISSING), + FnParameter("collection", LIST), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IN_COLLECTION__MISSING_SEXP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "in_collection", + returns = BOOL, + parameters = listOf( + FnParameter("value", MISSING), + FnParameter("collection", SEXP), + ), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function in_collection not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsAny.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsAny.kt new file mode 100644 index 0000000000..443dea1ff0 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsAny.kt @@ -0,0 +1,29 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_ANY__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_any", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_any not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsBag.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsBag.kt new file mode 100644 index 0000000000..723e91fd18 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsBag.kt @@ -0,0 +1,29 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_BAG__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_bag", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_bag not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsBinary.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsBinary.kt new file mode 100644 index 0000000000..f689068193 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsBinary.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_BINARY__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_binary", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_binary not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsBlob.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsBlob.kt new file mode 100644 index 0000000000..9699f2cfec --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsBlob.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_BLOB__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_blob", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_blob not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsBool.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsBool.kt new file mode 100644 index 0000000000..e4dcf31df4 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsBool.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_BOOL__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_bool", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_bool not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsByte.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsByte.kt new file mode 100644 index 0000000000..de0f3ccdea --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsByte.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_BYTE__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_byte", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_byte not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsChar.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsChar.kt new file mode 100644 index 0000000000..4c43bceca4 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsChar.kt @@ -0,0 +1,51 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_CHAR__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_char", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_char not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_CHAR__INT32_ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_char", + returns = BOOL, + parameters = listOf(FnParameter("type_parameter_1", INT32), +FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_char not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsClob.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsClob.kt new file mode 100644 index 0000000000..101eb07bdf --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsClob.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_CLOB__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_clob", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_clob not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsDate.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsDate.kt new file mode 100644 index 0000000000..0e4db3435b --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsDate.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_DATE__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_date", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_date not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsDecimal.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsDecimal.kt new file mode 100644 index 0000000000..fe23ba6d61 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsDecimal.kt @@ -0,0 +1,52 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_DECIMAL__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_decimal", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_decimal not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_DECIMAL__INT32_INT32_ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_decimal", + returns = BOOL, + parameters = listOf(FnParameter("type_parameter_1", INT32), +FnParameter("type_parameter_2", INT32), +FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_decimal not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsDecimalArbitrary.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsDecimalArbitrary.kt new file mode 100644 index 0000000000..992c88b4f6 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsDecimalArbitrary.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_DECIMAL_ARBITRARY__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_decimal_arbitrary", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_decimal_arbitrary not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsFloat32.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsFloat32.kt new file mode 100644 index 0000000000..2828b69e78 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsFloat32.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_FLOAT32__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_float32", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_float32 not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsFloat64.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsFloat64.kt new file mode 100644 index 0000000000..cde119636d --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsFloat64.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_FLOAT64__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_float64", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_float64 not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsInt.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsInt.kt new file mode 100644 index 0000000000..7347e21aec --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsInt.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_INT__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_int", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_int not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsInt16.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsInt16.kt new file mode 100644 index 0000000000..bd8da7fc07 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsInt16.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_INT16__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_int16", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_int16 not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsInt32.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsInt32.kt new file mode 100644 index 0000000000..aa2970a551 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsInt32.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_INT32__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_int32", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_int32 not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsInt64.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsInt64.kt new file mode 100644 index 0000000000..5f4197c25a --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsInt64.kt @@ -0,0 +1,28 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.* +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_INT64__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_int64", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_int64 not implemented") + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsInt8.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsInt8.kt new file mode 100644 index 0000000000..9609d5ceff --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsInt8.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_INT8__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_int8", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_int8 not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsInterval.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsInterval.kt new file mode 100644 index 0000000000..b8ac5c2f78 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsInterval.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_INTERVAL__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_interval", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_interval not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsList.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsList.kt new file mode 100644 index 0000000000..5f3956df28 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsList.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_LIST__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_list", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_list not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsMissing.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsMissing.kt new file mode 100644 index 0000000000..03678d1598 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsMissing.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_MISSING__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_missing", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_missing not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsNull.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsNull.kt new file mode 100644 index 0000000000..af7e4d4847 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsNull.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_NULL__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_null", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_null not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsSexp.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsSexp.kt new file mode 100644 index 0000000000..5bbf434ea7 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsSexp.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_SEXP__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_sexp", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_sexp not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsString.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsString.kt new file mode 100644 index 0000000000..3fe74195a3 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsString.kt @@ -0,0 +1,51 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_STRING__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_string", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_string not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_STRING__INT32_ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_string", + returns = BOOL, + parameters = listOf(FnParameter("type_parameter_1", INT32), +FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_string not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsStruct.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsStruct.kt new file mode 100644 index 0000000000..187428f65f --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsStruct.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_STRUCT__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_struct", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_struct not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsSymbol.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsSymbol.kt new file mode 100644 index 0000000000..d3a98c3fc7 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsSymbol.kt @@ -0,0 +1,33 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.ANY +import org.partiql.value.PartiQLValueType.BOOL + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_SYMBOL__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_symbol", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_symbol not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsTime.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsTime.kt new file mode 100644 index 0000000000..27d0cb6c18 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsTime.kt @@ -0,0 +1,52 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_TIME__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_time", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_time not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_TIME__BOOL_INT32_ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_time", + returns = BOOL, + parameters = listOf(FnParameter("type_parameter_1", BOOL), +FnParameter("type_parameter_2", INT32), +FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_time not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsTimestamp.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsTimestamp.kt new file mode 100644 index 0000000000..c1c8bb08a8 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnIsTimestamp.kt @@ -0,0 +1,52 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_TIMESTAMP__ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_timestamp", + returns = BOOL, + parameters = listOf(FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_timestamp not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_IS_TIMESTAMP__BOOL_INT32_ANY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "is_timestamp", + returns = BOOL, + parameters = listOf(FnParameter("type_parameter_1", BOOL), +FnParameter("type_parameter_2", INT32), +FnParameter("value", ANY),), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function is_timestamp not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnLike.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnLike.kt new file mode 100644 index 0000000000..d2b924dd78 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnLike.kt @@ -0,0 +1,71 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LIKE__STRING_STRING__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "like", + returns = BOOL, + parameters = listOf(FnParameter("value", STRING), +FnParameter("pattern", STRING),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function like not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LIKE__SYMBOL_SYMBOL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "like", + returns = BOOL, + parameters = listOf(FnParameter("value", SYMBOL), +FnParameter("pattern", SYMBOL),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function like not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LIKE__CLOB_CLOB__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "like", + returns = BOOL, + parameters = listOf(FnParameter("value", CLOB), +FnParameter("pattern", CLOB),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function like not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnLikeEscape.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnLikeEscape.kt new file mode 100644 index 0000000000..90d091ce7e --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnLikeEscape.kt @@ -0,0 +1,74 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LIKE_ESCAPE__STRING_STRING_STRING__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "like_escape", + returns = BOOL, + parameters = listOf(FnParameter("value", STRING), +FnParameter("pattern", STRING), +FnParameter("escape", STRING),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function like_escape not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LIKE_ESCAPE__SYMBOL_SYMBOL_SYMBOL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "like_escape", + returns = BOOL, + parameters = listOf(FnParameter("value", SYMBOL), +FnParameter("pattern", SYMBOL), +FnParameter("escape", SYMBOL),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function like_escape not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LIKE_ESCAPE__CLOB_CLOB_CLOB__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "like_escape", + returns = BOOL, + parameters = listOf(FnParameter("value", CLOB), +FnParameter("pattern", CLOB), +FnParameter("escape", CLOB),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function like_escape not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnLower.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnLower.kt new file mode 100644 index 0000000000..34537dbf4b --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnLower.kt @@ -0,0 +1,68 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LOWER__STRING__STRING : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lower", + returns = STRING, + parameters = listOf(FnParameter("value", STRING),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lower not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LOWER__SYMBOL__SYMBOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lower", + returns = SYMBOL, + parameters = listOf(FnParameter("value", SYMBOL),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lower not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LOWER__CLOB__CLOB : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lower", + returns = CLOB, + parameters = listOf(FnParameter("value", CLOB),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lower not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnLt.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnLt.kt new file mode 100644 index 0000000000..c5a70d30ef --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnLt.kt @@ -0,0 +1,299 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LT__INT8_INT8__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lt", + returns = BOOL, + parameters = listOf(FnParameter("lhs", INT8), +FnParameter("rhs", INT8),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lt not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LT__INT16_INT16__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lt", + returns = BOOL, + parameters = listOf(FnParameter("lhs", INT16), +FnParameter("rhs", INT16),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lt not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LT__INT32_INT32__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lt", + returns = BOOL, + parameters = listOf(FnParameter("lhs", INT32), +FnParameter("rhs", INT32),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lt not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LT__INT64_INT64__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lt", + returns = BOOL, + parameters = listOf(FnParameter("lhs", INT64), +FnParameter("rhs", INT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lt not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LT__INT_INT__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lt", + returns = BOOL, + parameters = listOf(FnParameter("lhs", INT), +FnParameter("rhs", INT),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lt not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LT__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lt", + returns = BOOL, + parameters = listOf(FnParameter("lhs", DECIMAL_ARBITRARY), +FnParameter("rhs", DECIMAL_ARBITRARY),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lt not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LT__FLOAT32_FLOAT32__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lt", + returns = BOOL, + parameters = listOf(FnParameter("lhs", FLOAT32), +FnParameter("rhs", FLOAT32),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lt not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LT__FLOAT64_FLOAT64__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lt", + returns = BOOL, + parameters = listOf(FnParameter("lhs", FLOAT64), +FnParameter("rhs", FLOAT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lt not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LT__STRING_STRING__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lt", + returns = BOOL, + parameters = listOf(FnParameter("lhs", STRING), +FnParameter("rhs", STRING),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lt not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LT__SYMBOL_SYMBOL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lt", + returns = BOOL, + parameters = listOf(FnParameter("lhs", SYMBOL), +FnParameter("rhs", SYMBOL),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lt not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LT__CLOB_CLOB__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lt", + returns = BOOL, + parameters = listOf(FnParameter("lhs", CLOB), +FnParameter("rhs", CLOB),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lt not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LT__DATE_DATE__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lt", + returns = BOOL, + parameters = listOf(FnParameter("lhs", DATE), +FnParameter("rhs", DATE),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lt not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LT__TIME_TIME__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lt", + returns = BOOL, + parameters = listOf(FnParameter("lhs", TIME), +FnParameter("rhs", TIME),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lt not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LT__TIMESTAMP_TIMESTAMP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lt", + returns = BOOL, + parameters = listOf(FnParameter("lhs", TIMESTAMP), +FnParameter("rhs", TIMESTAMP),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lt not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LT__BOOL_BOOL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lt", + returns = BOOL, + parameters = listOf(FnParameter("lhs", BOOL), +FnParameter("rhs", BOOL),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lt not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnLte.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnLte.kt new file mode 100644 index 0000000000..157559dd68 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnLte.kt @@ -0,0 +1,299 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LTE__INT8_INT8__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lte", + returns = BOOL, + parameters = listOf(FnParameter("lhs", INT8), +FnParameter("rhs", INT8),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lte not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LTE__INT16_INT16__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lte", + returns = BOOL, + parameters = listOf(FnParameter("lhs", INT16), +FnParameter("rhs", INT16),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lte not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LTE__INT32_INT32__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lte", + returns = BOOL, + parameters = listOf(FnParameter("lhs", INT32), +FnParameter("rhs", INT32),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lte not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LTE__INT64_INT64__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lte", + returns = BOOL, + parameters = listOf(FnParameter("lhs", INT64), +FnParameter("rhs", INT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lte not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LTE__INT_INT__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lte", + returns = BOOL, + parameters = listOf(FnParameter("lhs", INT), +FnParameter("rhs", INT),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lte not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LTE__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lte", + returns = BOOL, + parameters = listOf(FnParameter("lhs", DECIMAL_ARBITRARY), +FnParameter("rhs", DECIMAL_ARBITRARY),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lte not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LTE__FLOAT32_FLOAT32__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lte", + returns = BOOL, + parameters = listOf(FnParameter("lhs", FLOAT32), +FnParameter("rhs", FLOAT32),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lte not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LTE__FLOAT64_FLOAT64__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lte", + returns = BOOL, + parameters = listOf(FnParameter("lhs", FLOAT64), +FnParameter("rhs", FLOAT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lte not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LTE__STRING_STRING__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lte", + returns = BOOL, + parameters = listOf(FnParameter("lhs", STRING), +FnParameter("rhs", STRING),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lte not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LTE__SYMBOL_SYMBOL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lte", + returns = BOOL, + parameters = listOf(FnParameter("lhs", SYMBOL), +FnParameter("rhs", SYMBOL),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lte not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LTE__CLOB_CLOB__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lte", + returns = BOOL, + parameters = listOf(FnParameter("lhs", CLOB), +FnParameter("rhs", CLOB),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lte not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LTE__DATE_DATE__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lte", + returns = BOOL, + parameters = listOf(FnParameter("lhs", DATE), +FnParameter("rhs", DATE),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lte not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LTE__TIME_TIME__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lte", + returns = BOOL, + parameters = listOf(FnParameter("lhs", TIME), +FnParameter("rhs", TIME),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lte not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LTE__TIMESTAMP_TIMESTAMP__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lte", + returns = BOOL, + parameters = listOf(FnParameter("lhs", TIMESTAMP), +FnParameter("rhs", TIMESTAMP),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lte not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_LTE__BOOL_BOOL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "lte", + returns = BOOL, + parameters = listOf(FnParameter("lhs", BOOL), +FnParameter("rhs", BOOL),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function lte not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnMinus.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnMinus.kt new file mode 100644 index 0000000000..6f74c43fdb --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnMinus.kt @@ -0,0 +1,166 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_MINUS__INT8_INT8__INT8 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "minus", + returns = INT8, + parameters = listOf(FnParameter("lhs", INT8), +FnParameter("rhs", INT8),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function minus not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_MINUS__INT16_INT16__INT16 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "minus", + returns = INT16, + parameters = listOf(FnParameter("lhs", INT16), +FnParameter("rhs", INT16),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function minus not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_MINUS__INT32_INT32__INT32 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "minus", + returns = INT32, + parameters = listOf(FnParameter("lhs", INT32), +FnParameter("rhs", INT32),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function minus not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_MINUS__INT64_INT64__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "minus", + returns = INT64, + parameters = listOf(FnParameter("lhs", INT64), +FnParameter("rhs", INT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function minus not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_MINUS__INT_INT__INT : FnScalar { + + override val signature = FnSignature.Scalar( + name = "minus", + returns = INT, + parameters = listOf(FnParameter("lhs", INT), +FnParameter("rhs", INT),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function minus not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_MINUS__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__DECIMAL_ARBITRARY : FnScalar { + + override val signature = FnSignature.Scalar( + name = "minus", + returns = DECIMAL_ARBITRARY, + parameters = listOf(FnParameter("lhs", DECIMAL_ARBITRARY), +FnParameter("rhs", DECIMAL_ARBITRARY),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function minus not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_MINUS__FLOAT32_FLOAT32__FLOAT32 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "minus", + returns = FLOAT32, + parameters = listOf(FnParameter("lhs", FLOAT32), +FnParameter("rhs", FLOAT32),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function minus not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_MINUS__FLOAT64_FLOAT64__FLOAT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "minus", + returns = FLOAT64, + parameters = listOf(FnParameter("lhs", FLOAT64), +FnParameter("rhs", FLOAT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function minus not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnModulo.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnModulo.kt new file mode 100644 index 0000000000..90724c5d4c --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnModulo.kt @@ -0,0 +1,166 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_MODULO__INT8_INT8__INT8 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "modulo", + returns = INT8, + parameters = listOf(FnParameter("lhs", INT8), +FnParameter("rhs", INT8),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function modulo not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_MODULO__INT16_INT16__INT16 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "modulo", + returns = INT16, + parameters = listOf(FnParameter("lhs", INT16), +FnParameter("rhs", INT16),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function modulo not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_MODULO__INT32_INT32__INT32 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "modulo", + returns = INT32, + parameters = listOf(FnParameter("lhs", INT32), +FnParameter("rhs", INT32),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function modulo not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_MODULO__INT64_INT64__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "modulo", + returns = INT64, + parameters = listOf(FnParameter("lhs", INT64), +FnParameter("rhs", INT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function modulo not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_MODULO__INT_INT__INT : FnScalar { + + override val signature = FnSignature.Scalar( + name = "modulo", + returns = INT, + parameters = listOf(FnParameter("lhs", INT), +FnParameter("rhs", INT),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function modulo not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_MODULO__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__DECIMAL_ARBITRARY : FnScalar { + + override val signature = FnSignature.Scalar( + name = "modulo", + returns = DECIMAL_ARBITRARY, + parameters = listOf(FnParameter("lhs", DECIMAL_ARBITRARY), +FnParameter("rhs", DECIMAL_ARBITRARY),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function modulo not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_MODULO__FLOAT32_FLOAT32__FLOAT32 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "modulo", + returns = FLOAT32, + parameters = listOf(FnParameter("lhs", FLOAT32), +FnParameter("rhs", FLOAT32),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function modulo not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_MODULO__FLOAT64_FLOAT64__FLOAT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "modulo", + returns = FLOAT64, + parameters = listOf(FnParameter("lhs", FLOAT64), +FnParameter("rhs", FLOAT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function modulo not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnNeg.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnNeg.kt new file mode 100644 index 0000000000..7f6c79cdbe --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnNeg.kt @@ -0,0 +1,158 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_NEG__INT8__INT8 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "neg", + returns = INT8, + parameters = listOf(FnParameter("value", INT8),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function neg not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_NEG__INT16__INT16 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "neg", + returns = INT16, + parameters = listOf(FnParameter("value", INT16),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function neg not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_NEG__INT32__INT32 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "neg", + returns = INT32, + parameters = listOf(FnParameter("value", INT32),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function neg not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_NEG__INT64__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "neg", + returns = INT64, + parameters = listOf(FnParameter("value", INT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function neg not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_NEG__INT__INT : FnScalar { + + override val signature = FnSignature.Scalar( + name = "neg", + returns = INT, + parameters = listOf(FnParameter("value", INT),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function neg not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_NEG__DECIMAL_ARBITRARY__DECIMAL_ARBITRARY : FnScalar { + + override val signature = FnSignature.Scalar( + name = "neg", + returns = DECIMAL_ARBITRARY, + parameters = listOf(FnParameter("value", DECIMAL_ARBITRARY),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function neg not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_NEG__FLOAT32__FLOAT32 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "neg", + returns = FLOAT32, + parameters = listOf(FnParameter("value", FLOAT32),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function neg not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_NEG__FLOAT64__FLOAT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "neg", + returns = FLOAT64, + parameters = listOf(FnParameter("value", FLOAT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function neg not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnNot.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnNot.kt new file mode 100644 index 0000000000..3db68f896d --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnNot.kt @@ -0,0 +1,51 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.BOOL +import org.partiql.value.PartiQLValueType.MISSING + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_NOT__BOOL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "not", + returns = BOOL, + parameters = listOf(FnParameter("value", BOOL),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function not not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_NOT__MISSING__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "not", + returns = BOOL, + parameters = listOf(FnParameter("value", MISSING),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function not not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnOr.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnOr.kt new file mode 100644 index 0000000000..86c4133f9b --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnOr.kt @@ -0,0 +1,91 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.BOOL +import org.partiql.value.PartiQLValueType.MISSING + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_OR__BOOL_BOOL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "or", + returns = BOOL, + parameters = listOf(FnParameter("lhs", BOOL), +FnParameter("rhs", BOOL),), + isNullCall = false, + isNullable = true, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function or not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_OR__MISSING_BOOL__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "or", + returns = BOOL, + parameters = listOf(FnParameter("lhs", MISSING), +FnParameter("rhs", BOOL),), + isNullCall = false, + isNullable = true, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function or not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_OR__BOOL_MISSING__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "or", + returns = BOOL, + parameters = listOf(FnParameter("lhs", BOOL), +FnParameter("rhs", MISSING),), + isNullCall = false, + isNullable = true, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function or not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_OR__MISSING_MISSING__BOOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "or", + returns = BOOL, + parameters = listOf(FnParameter("lhs", MISSING), +FnParameter("rhs", MISSING),), + isNullCall = false, + isNullable = true, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function or not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnPlus.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnPlus.kt new file mode 100644 index 0000000000..3ae771decd --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnPlus.kt @@ -0,0 +1,166 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_PLUS__INT8_INT8__INT8 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "plus", + returns = INT8, + parameters = listOf(FnParameter("lhs", INT8), +FnParameter("rhs", INT8),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function plus not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_PLUS__INT16_INT16__INT16 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "plus", + returns = INT16, + parameters = listOf(FnParameter("lhs", INT16), +FnParameter("rhs", INT16),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function plus not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_PLUS__INT32_INT32__INT32 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "plus", + returns = INT32, + parameters = listOf(FnParameter("lhs", INT32), +FnParameter("rhs", INT32),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function plus not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_PLUS__INT64_INT64__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "plus", + returns = INT64, + parameters = listOf(FnParameter("lhs", INT64), +FnParameter("rhs", INT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function plus not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_PLUS__INT_INT__INT : FnScalar { + + override val signature = FnSignature.Scalar( + name = "plus", + returns = INT, + parameters = listOf(FnParameter("lhs", INT), +FnParameter("rhs", INT),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function plus not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_PLUS__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__DECIMAL_ARBITRARY : FnScalar { + + override val signature = FnSignature.Scalar( + name = "plus", + returns = DECIMAL_ARBITRARY, + parameters = listOf(FnParameter("lhs", DECIMAL_ARBITRARY), +FnParameter("rhs", DECIMAL_ARBITRARY),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function plus not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_PLUS__FLOAT32_FLOAT32__FLOAT32 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "plus", + returns = FLOAT32, + parameters = listOf(FnParameter("lhs", FLOAT32), +FnParameter("rhs", FLOAT32),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function plus not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_PLUS__FLOAT64_FLOAT64__FLOAT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "plus", + returns = FLOAT64, + parameters = listOf(FnParameter("lhs", FLOAT64), +FnParameter("rhs", FLOAT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function plus not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnPos.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnPos.kt new file mode 100644 index 0000000000..0a1a977ab2 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnPos.kt @@ -0,0 +1,158 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_POS__INT8__INT8 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "pos", + returns = INT8, + parameters = listOf(FnParameter("value", INT8),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function pos not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_POS__INT16__INT16 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "pos", + returns = INT16, + parameters = listOf(FnParameter("value", INT16),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function pos not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_POS__INT32__INT32 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "pos", + returns = INT32, + parameters = listOf(FnParameter("value", INT32),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function pos not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_POS__INT64__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "pos", + returns = INT64, + parameters = listOf(FnParameter("value", INT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function pos not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_POS__INT__INT : FnScalar { + + override val signature = FnSignature.Scalar( + name = "pos", + returns = INT, + parameters = listOf(FnParameter("value", INT),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function pos not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_POS__DECIMAL_ARBITRARY__DECIMAL_ARBITRARY : FnScalar { + + override val signature = FnSignature.Scalar( + name = "pos", + returns = DECIMAL_ARBITRARY, + parameters = listOf(FnParameter("value", DECIMAL_ARBITRARY),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function pos not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_POS__FLOAT32__FLOAT32 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "pos", + returns = FLOAT32, + parameters = listOf(FnParameter("value", FLOAT32),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function pos not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_POS__FLOAT64__FLOAT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "pos", + returns = FLOAT64, + parameters = listOf(FnParameter("value", FLOAT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function pos not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnPosition.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnPosition.kt new file mode 100644 index 0000000000..b8700fd2c4 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnPosition.kt @@ -0,0 +1,71 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_POSITION__STRING_STRING__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "position", + returns = INT64, + parameters = listOf(FnParameter("probe", STRING), +FnParameter("value", STRING),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function position not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_POSITION__SYMBOL_SYMBOL__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "position", + returns = INT64, + parameters = listOf(FnParameter("probe", SYMBOL), +FnParameter("value", SYMBOL),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function position not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_POSITION__CLOB_CLOB__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "position", + returns = INT64, + parameters = listOf(FnParameter("probe", CLOB), +FnParameter("value", CLOB),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function position not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnSubstring.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnSubstring.kt new file mode 100644 index 0000000000..e0058b05dd --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnSubstring.kt @@ -0,0 +1,130 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_SUBSTRING__STRING_INT64__STRING : FnScalar { + + override val signature = FnSignature.Scalar( + name = "substring", + returns = STRING, + parameters = listOf(FnParameter("value", STRING), +FnParameter("start", INT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function substring not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_SUBSTRING__STRING_INT64_INT64__STRING : FnScalar { + + override val signature = FnSignature.Scalar( + name = "substring", + returns = STRING, + parameters = listOf(FnParameter("value", STRING), +FnParameter("start", INT64), +FnParameter("end", INT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function substring not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_SUBSTRING__SYMBOL_INT64__SYMBOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "substring", + returns = SYMBOL, + parameters = listOf(FnParameter("value", SYMBOL), +FnParameter("start", INT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function substring not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_SUBSTRING__SYMBOL_INT64_INT64__SYMBOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "substring", + returns = SYMBOL, + parameters = listOf(FnParameter("value", SYMBOL), +FnParameter("start", INT64), +FnParameter("end", INT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function substring not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_SUBSTRING__CLOB_INT64__CLOB : FnScalar { + + override val signature = FnSignature.Scalar( + name = "substring", + returns = CLOB, + parameters = listOf(FnParameter("value", CLOB), +FnParameter("start", INT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function substring not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_SUBSTRING__CLOB_INT64_INT64__CLOB : FnScalar { + + override val signature = FnSignature.Scalar( + name = "substring", + returns = CLOB, + parameters = listOf(FnParameter("value", CLOB), +FnParameter("start", INT64), +FnParameter("end", INT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function substring not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTimes.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTimes.kt new file mode 100644 index 0000000000..0c79d38b68 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTimes.kt @@ -0,0 +1,166 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TIMES__INT8_INT8__INT8 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "times", + returns = INT8, + parameters = listOf(FnParameter("lhs", INT8), +FnParameter("rhs", INT8),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function times not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TIMES__INT16_INT16__INT16 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "times", + returns = INT16, + parameters = listOf(FnParameter("lhs", INT16), +FnParameter("rhs", INT16),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function times not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TIMES__INT32_INT32__INT32 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "times", + returns = INT32, + parameters = listOf(FnParameter("lhs", INT32), +FnParameter("rhs", INT32),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function times not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TIMES__INT64_INT64__INT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "times", + returns = INT64, + parameters = listOf(FnParameter("lhs", INT64), +FnParameter("rhs", INT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function times not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TIMES__INT_INT__INT : FnScalar { + + override val signature = FnSignature.Scalar( + name = "times", + returns = INT, + parameters = listOf(FnParameter("lhs", INT), +FnParameter("rhs", INT),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function times not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TIMES__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__DECIMAL_ARBITRARY : FnScalar { + + override val signature = FnSignature.Scalar( + name = "times", + returns = DECIMAL_ARBITRARY, + parameters = listOf(FnParameter("lhs", DECIMAL_ARBITRARY), +FnParameter("rhs", DECIMAL_ARBITRARY),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function times not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TIMES__FLOAT32_FLOAT32__FLOAT32 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "times", + returns = FLOAT32, + parameters = listOf(FnParameter("lhs", FLOAT32), +FnParameter("rhs", FLOAT32),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function times not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TIMES__FLOAT64_FLOAT64__FLOAT64 : FnScalar { + + override val signature = FnSignature.Scalar( + name = "times", + returns = FLOAT64, + parameters = listOf(FnParameter("lhs", FLOAT64), +FnParameter("rhs", FLOAT64),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function times not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTrim.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTrim.kt new file mode 100644 index 0000000000..1863a1d6ee --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTrim.kt @@ -0,0 +1,68 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TRIM__STRING__STRING : FnScalar { + + override val signature = FnSignature.Scalar( + name = "trim", + returns = STRING, + parameters = listOf(FnParameter("value", STRING),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function trim not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TRIM__SYMBOL__SYMBOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "trim", + returns = SYMBOL, + parameters = listOf(FnParameter("value", SYMBOL),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function trim not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TRIM__CLOB__CLOB : FnScalar { + + override val signature = FnSignature.Scalar( + name = "trim", + returns = CLOB, + parameters = listOf(FnParameter("value", CLOB),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function trim not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTrimChars.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTrimChars.kt new file mode 100644 index 0000000000..88683733de --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTrimChars.kt @@ -0,0 +1,71 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TRIM_CHARS__STRING_STRING__STRING : FnScalar { + + override val signature = FnSignature.Scalar( + name = "trim_chars", + returns = STRING, + parameters = listOf(FnParameter("value", STRING), +FnParameter("chars", STRING),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function trim_chars not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TRIM_CHARS__SYMBOL_SYMBOL__SYMBOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "trim_chars", + returns = SYMBOL, + parameters = listOf(FnParameter("value", SYMBOL), +FnParameter("chars", SYMBOL),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function trim_chars not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TRIM_CHARS__CLOB_CLOB__CLOB : FnScalar { + + override val signature = FnSignature.Scalar( + name = "trim_chars", + returns = CLOB, + parameters = listOf(FnParameter("value", CLOB), +FnParameter("chars", CLOB),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function trim_chars not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTrimLeading.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTrimLeading.kt new file mode 100644 index 0000000000..85f7e545a4 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTrimLeading.kt @@ -0,0 +1,68 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TRIM_LEADING__STRING__STRING : FnScalar { + + override val signature = FnSignature.Scalar( + name = "trim_leading", + returns = STRING, + parameters = listOf(FnParameter("value", STRING),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function trim_leading not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TRIM_LEADING__SYMBOL__SYMBOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "trim_leading", + returns = SYMBOL, + parameters = listOf(FnParameter("value", SYMBOL),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function trim_leading not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TRIM_LEADING__CLOB__CLOB : FnScalar { + + override val signature = FnSignature.Scalar( + name = "trim_leading", + returns = CLOB, + parameters = listOf(FnParameter("value", CLOB),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function trim_leading not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTrimLeadingChars.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTrimLeadingChars.kt new file mode 100644 index 0000000000..cf0e1dd8df --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTrimLeadingChars.kt @@ -0,0 +1,71 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TRIM_LEADING_CHARS__STRING_STRING__STRING : FnScalar { + + override val signature = FnSignature.Scalar( + name = "trim_leading_chars", + returns = STRING, + parameters = listOf(FnParameter("value", STRING), +FnParameter("chars", STRING),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function trim_leading_chars not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TRIM_LEADING_CHARS__SYMBOL_SYMBOL__SYMBOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "trim_leading_chars", + returns = SYMBOL, + parameters = listOf(FnParameter("value", SYMBOL), +FnParameter("chars", SYMBOL),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function trim_leading_chars not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TRIM_LEADING_CHARS__CLOB_CLOB__CLOB : FnScalar { + + override val signature = FnSignature.Scalar( + name = "trim_leading_chars", + returns = CLOB, + parameters = listOf(FnParameter("value", CLOB), +FnParameter("chars", CLOB),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function trim_leading_chars not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTrimTrailing.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTrimTrailing.kt new file mode 100644 index 0000000000..c949417e34 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTrimTrailing.kt @@ -0,0 +1,68 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TRIM_TRAILING__STRING__STRING : FnScalar { + + override val signature = FnSignature.Scalar( + name = "trim_trailing", + returns = STRING, + parameters = listOf(FnParameter("value", STRING),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function trim_trailing not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TRIM_TRAILING__SYMBOL__SYMBOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "trim_trailing", + returns = SYMBOL, + parameters = listOf(FnParameter("value", SYMBOL),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function trim_trailing not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TRIM_TRAILING__CLOB__CLOB : FnScalar { + + override val signature = FnSignature.Scalar( + name = "trim_trailing", + returns = CLOB, + parameters = listOf(FnParameter("value", CLOB),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function trim_trailing not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTrimTrailingChars.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTrimTrailingChars.kt new file mode 100644 index 0000000000..568500b439 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnTrimTrailingChars.kt @@ -0,0 +1,71 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TRIM_TRAILING_CHARS__STRING_STRING__STRING : FnScalar { + + override val signature = FnSignature.Scalar( + name = "trim_trailing_chars", + returns = STRING, + parameters = listOf(FnParameter("value", STRING), +FnParameter("chars", STRING),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function trim_trailing_chars not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TRIM_TRAILING_CHARS__SYMBOL_SYMBOL__SYMBOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "trim_trailing_chars", + returns = SYMBOL, + parameters = listOf(FnParameter("value", SYMBOL), +FnParameter("chars", SYMBOL),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function trim_trailing_chars not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_TRIM_TRAILING_CHARS__CLOB_CLOB__CLOB : FnScalar { + + override val signature = FnSignature.Scalar( + name = "trim_trailing_chars", + returns = CLOB, + parameters = listOf(FnParameter("value", CLOB), +FnParameter("chars", CLOB),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function trim_trailing_chars not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnUpper.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnUpper.kt new file mode 100644 index 0000000000..bcd63eee94 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnUpper.kt @@ -0,0 +1,68 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.* + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_UPPER__STRING__STRING : FnScalar { + + override val signature = FnSignature.Scalar( + name = "upper", + returns = STRING, + parameters = listOf(FnParameter("value", STRING),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function upper not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_UPPER__SYMBOL__SYMBOL : FnScalar { + + override val signature = FnSignature.Scalar( + name = "upper", + returns = SYMBOL, + parameters = listOf(FnParameter("value", SYMBOL),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function upper not implemented") + } +} + + + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_UPPER__CLOB__CLOB : FnScalar { + + override val signature = FnSignature.Scalar( + name = "upper", + returns = CLOB, + parameters = listOf(FnParameter("value", CLOB),), + isNullCall = true, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function upper not implemented") + } +} + + diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnUtcnow.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnUtcnow.kt new file mode 100644 index 0000000000..15d4f61904 --- /dev/null +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/scalar/FnUtcnow.kt @@ -0,0 +1,27 @@ +// ktlint-disable filename +@file:Suppress("ClassName") + +package org.partiql.spi.connector.sql.internal.builtins.scalar + +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.PartiQLValueType.TIMESTAMP + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object Fn_UTCNOW____TIMESTAMP : FnScalar { + + override val signature = FnSignature.Scalar( + name = "utcnow", + returns = TIMESTAMP, + parameters = listOf(), + isNullCall = false, + isNullable = false, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function utcnow not implemented") + } +} diff --git a/partiql-spi/src/test/kotlin/org/partiql/spi/connector/sql/HeaderCodeGen.kt b/partiql-spi/src/test/kotlin/org/partiql/spi/connector/sql/HeaderCodeGen.kt new file mode 100644 index 0000000000..73b0036bc5 --- /dev/null +++ b/partiql-spi/src/test/kotlin/org/partiql/spi/connector/sql/HeaderCodeGen.kt @@ -0,0 +1,153 @@ +package org.partiql.spi.connector.sql + +import net.pearx.kasechange.toPascalCase +import org.junit.jupiter.api.Test +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValueExperimental +import java.io.File + +const val imports = """ +import org.partiql.spi.fn.FnExperimental +import org.partiql.spi.fn.FnParameter +import org.partiql.spi.fn.FnScalar +import org.partiql.spi.fn.FnAggregation +import org.partiql.spi.fn.FnSignature +import org.partiql.value.PartiQLValueExperimental +import org.partiql.value.* +import org.partiql.value.PartiQLValueType.* +""" + +/** + * 0 -> Pascal case name + * 1 —> Snake case name + * 2 —> Return Type + * 3 —> Parameter list as string + * 4 —> isNullCall + * 5 -> isNullable + * 6 —> Snake case name + */ +const val TEMPLATE_SCALAR = """ +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object %s : FnScalar { + + override val signature = FnSignature.Scalar( + name = "%s", + returns = %s, + parameters = listOf(%s), + isNullCall = %b, + isNullable = %b, + ) + + override fun invoke(args: Array): PartiQLValue { + TODO("Function %s not implemented") + } +} +""" + +/** + * 0 -> Pascal case name + * 1 —> Snake case name + * 2 —> Return Type + * 3 —> Parameter list as string + * 4 -> isNullable + * 5 —> isDecomposable + * 6 —> Snake case name + */ +const val TEMPLATE_AGG = """ +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +internal object %s : FnAggregation { + + override val signature = FnSignature.Aggregation( + name = "%s", + returns = %s, + parameters = listOf(%s), + isNullable = %b, + isDecomposable = %b + ) + + override fun accumulator(): FnAggregation.Accumulator { + TODO("Aggregation %s not implemented") + } +} +""" + +@OptIn(PartiQLValueExperimental::class, FnExperimental::class) +class HeaderCodeGen { + + @Test + fun scalars() { + generate("package org.partiql.spi.connector.sql.internal.builtins.scalar", TEMPLATE_SCALAR, "Fn", SqlHeader.functions) + generate("package org.partiql.spi.connector.sql.internal.builtins.scalar", TEMPLATE_SCALAR, "Fn", SqlHeader.operators()) + } + + @Test + fun aggregations() { + generate("package org.partiql.spi.connector.sql.internal.builtins.agg", TEMPLATE_AGG, "Agg", SqlHeader.aggregations) + } + + /** + * Writes function implementation to file, prints list of classes + */ + private fun generate( + packageName: String, + template: String, + prefix: String, + signatures: List, + ) { + val clazzes = mutableListOf() + val funcs = signatures.groupBy { it.name } + val pathToDir = "./src/main/kotlin/org/partiql/spi/connector/sql/internal/builtins/agg" + for ((name, fns) in funcs) { + val pre = "${prefix}_$name".toPascalCase() + val file = File("$pathToDir/$pre.kt") + file.printWriter().use { + it.appendLine("// ktlint-disable filename") + it.appendLine("@file:Suppress(\"ClassName\")") + it.appendLine() + it.appendLine(packageName) + it.appendLine() + it.appendLine(imports) + it.appendLine() + fns.forEach { sig -> + val clazz = "${prefix}_${sig.specific}" + val params = toParams(clazz, sig) + val code = String.format(template, *params) + it.appendLine(code) + it.appendLine() + clazzes.add(clazz) + } + } + } + println("-- GENERATED") + println("listOf(${clazzes.joinToString()})") + println() + } + + @OptIn(FnExperimental::class) + private fun toParams(clazz: String, fn: FnSignature) = when (fn) { + is FnSignature.Aggregation -> toParams(clazz, fn) + is FnSignature.Scalar -> toParams(clazz, fn) + } + + @OptIn(FnExperimental::class) + private fun toParams(clazz: String, fn: FnSignature.Scalar): Array { + val snake = fn.name + val returns = fn.returns.name + val parameters = fn.parameters.mapIndexed { i, p -> + "FnParameter(\"${p.name}\", ${p.type.name})" + }.joinToString(",\n", postfix = ",") + return arrayOf(clazz, snake, returns, parameters, fn.isNullCall, fn.isNullable, snake) + } + + @OptIn(FnExperimental::class) + private fun toParams(clazz: String, fn: FnSignature.Aggregation): Array { + val snake = fn.name + val returns = fn.returns.name + var parameters = "" + for (p in fn.parameters) { + parameters += "FnParameter(\"${p.name}\", ${p.type.name}),\n" + } + return arrayOf(clazz, snake, returns, parameters, fn.isNullable, fn.isDecomposable, snake) + } +} diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/SqlHeader.kt b/partiql-spi/src/test/kotlin/org/partiql/spi/connector/sql/SqlHeader.kt similarity index 97% rename from partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/SqlHeader.kt rename to partiql-spi/src/test/kotlin/org/partiql/spi/connector/sql/SqlHeader.kt index ae6d433342..af7f532825 100644 --- a/partiql-spi/src/main/kotlin/org/partiql/spi/connector/sql/SqlHeader.kt +++ b/partiql-spi/src/test/kotlin/org/partiql/spi/connector/sql/SqlHeader.kt @@ -102,7 +102,7 @@ internal object SqlHeader { /** * Generate all unary and binary operator signatures. */ - private fun operators(): List = listOf( + public fun operators(): List = listOf( pos(), neg(), plus(), @@ -175,8 +175,6 @@ internal object SqlHeader { private fun builtins(): List = listOf( upper(), lower(), - position(), - substring(), trim(), utcNow(), ).flatten() @@ -427,17 +425,21 @@ internal object SqlHeader { private fun isNull(): List = listOf( FnSignature.Scalar( - name = "is_null", returns = BOOL, parameters = listOf( + name = "is_null", returns = BOOL, + parameters = listOf( FnParameter("value", ANY) // TODO: Decide if we need to further segment this - ), isNullCall = false, isNullable = false + ), + isNullCall = false, isNullable = false ) ) private fun isMissing(): List = listOf( FnSignature.Scalar( - name = "is_missing", returns = BOOL, parameters = listOf( + name = "is_missing", returns = BOOL, + parameters = listOf( FnParameter("value", ANY) // TODO: Decide if we need to further segment this - ), isNullCall = false, isNullable = false + ), + isNullCall = false, isNullable = false ) ) @@ -461,29 +463,35 @@ internal object SqlHeader { // we put type parameter before value. private fun isTypeSingleArg(): List = listOf(CHAR, STRING).map { element -> FnSignature.Scalar( - name = "is_${element.name.lowercase()}", returns = BOOL, parameters = listOf( + name = "is_${element.name.lowercase()}", returns = BOOL, + parameters = listOf( FnParameter("type_parameter_1", INT32), FnParameter("value", ANY) - ), isNullable = false, isNullCall = false + ), + isNullable = false, isNullCall = false ) } private fun isTypeDoubleArgsInt(): List = listOf(DECIMAL).map { element -> FnSignature.Scalar( - name = "is_${element.name.lowercase()}", returns = BOOL, parameters = listOf( + name = "is_${element.name.lowercase()}", returns = BOOL, + parameters = listOf( FnParameter("type_parameter_1", INT32), FnParameter("type_parameter_2", INT32), FnParameter("value", ANY) - ), isNullable = false, isNullCall = false + ), + isNullable = false, isNullCall = false ) } private fun isTypeTime(): List = listOf(TIME, TIMESTAMP).map { element -> FnSignature.Scalar( - name = "is_${element.name.lowercase()}", returns = BOOL, parameters = listOf( + name = "is_${element.name.lowercase()}", returns = BOOL, + parameters = listOf( FnParameter("type_parameter_1", BOOL), FnParameter("type_parameter_2", INT32), FnParameter("value", ANY) // TODO: Decide if we need to further segment this - ), isNullable = false, isNullCall = false + ), + isNullable = false, isNullCall = false ) } @@ -500,7 +508,8 @@ internal object SqlHeader { ), isNullable = false, isNullCall = true, - ), FnSignature.Scalar( + ), + FnSignature.Scalar( name = "substring", returns = t, parameters = listOf(