diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/function/builtins/ArithmeticDiadicOperator.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/function/builtins/ArithmeticDiadicOperator.kt index e33845f53..d217897c5 100644 --- a/partiql-spi/src/main/kotlin/org/partiql/spi/function/builtins/ArithmeticDiadicOperator.kt +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/function/builtins/ArithmeticDiadicOperator.kt @@ -2,6 +2,7 @@ package org.partiql.spi.function.builtins import org.partiql.spi.function.Function import org.partiql.spi.function.Parameter +import org.partiql.spi.function.builtins.TypePrecedence.TYPE_PRECEDENCE import org.partiql.spi.internal.SqlTypeFamily import org.partiql.spi.value.Datum import org.partiql.types.PType diff --git a/partiql-spi/src/main/kotlin/org/partiql/spi/function/builtins/TypePrecedence.kt b/partiql-spi/src/main/kotlin/org/partiql/spi/function/builtins/TypePrecedence.kt index b63a30d96..fdb4b03a2 100644 --- a/partiql-spi/src/main/kotlin/org/partiql/spi/function/builtins/TypePrecedence.kt +++ b/partiql-spi/src/main/kotlin/org/partiql/spi/function/builtins/TypePrecedence.kt @@ -2,35 +2,37 @@ package org.partiql.spi.function.builtins import org.partiql.types.PType.Kind -/** - * @return the precedence of the types for the PartiQL comparator. - * @see .TYPE_PRECEDENCE - */ -@Suppress("deprecation") -internal val TYPE_PRECEDENCE: Map = listOf( - Kind.UNKNOWN, - Kind.BOOL, - Kind.TINYINT, - Kind.SMALLINT, - Kind.INTEGER, - Kind.BIGINT, - Kind.NUMERIC, - Kind.DECIMAL, - Kind.REAL, - Kind.DOUBLE, - Kind.CHAR, - Kind.VARCHAR, - Kind.STRING, - Kind.CLOB, - Kind.BLOB, - Kind.DATE, - Kind.TIME, - Kind.TIMEZ, - Kind.TIMESTAMP, - Kind.TIMESTAMPZ, - Kind.ARRAY, - Kind.BAG, - Kind.ROW, - Kind.STRUCT, - Kind.DYNAMIC -).mapIndexed { precedence, type -> type to precedence }.toMap() +internal object TypePrecedence { + + /** + * @return the precedence of the types for the PartiQL comparator. + * @see .TYPE_PRECEDENCE + */ + internal val TYPE_PRECEDENCE: Map = listOf( + Kind.UNKNOWN, + Kind.BOOL, + Kind.TINYINT, + Kind.SMALLINT, + Kind.INTEGER, + Kind.BIGINT, + Kind.NUMERIC, + Kind.DECIMAL, + Kind.REAL, + Kind.DOUBLE, + Kind.CHAR, + Kind.VARCHAR, + Kind.STRING, + Kind.CLOB, + Kind.BLOB, + Kind.DATE, + Kind.TIME, + Kind.TIMEZ, + Kind.TIMESTAMP, + Kind.TIMESTAMPZ, + Kind.ARRAY, + Kind.BAG, + Kind.ROW, + Kind.STRUCT, + Kind.DYNAMIC + ).mapIndexed { precedence, type -> type to precedence }.toMap() +}