Skip to content

Commit 324c1c4

Browse files
matrivtwalthr
authored andcommitted
[hotfix][table-planner] Remove prefix for TypeCheckUtils methods
Use consistently the methods of TypeCheckUtils without the prefix, since `TypeCheckUtils._` is anyway imported
1 parent 6b92e07 commit 324c1c4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import org.apache.flink.table.runtime.functions.{SqlDateTimeUtils, SqlFunctionUt
3131
import org.apache.flink.table.runtime.types.LogicalTypeDataTypeConverter.fromLogicalTypeToDataType
3232
import org.apache.flink.table.runtime.types.PlannerTypeUtils
3333
import org.apache.flink.table.runtime.types.PlannerTypeUtils.{isInteroperable, isPrimitive}
34-
import org.apache.flink.table.runtime.typeutils.TypeCheckUtils
3534
import org.apache.flink.table.runtime.typeutils.TypeCheckUtils._
3635
import org.apache.flink.table.types.logical.LogicalTypeFamily.DATETIME
3736
import org.apache.flink.table.types.logical.LogicalTypeRoot._
@@ -996,7 +995,7 @@ object ScalarOperatorGens {
996995
operand.copy(resultType = targetType)
997996

998997
// Date/Time/Timestamp -> String
999-
case (_, VARCHAR | CHAR) if TypeCheckUtils.isTimePoint(operand.resultType) =>
998+
case (_, VARCHAR | CHAR) if isTimePoint(operand.resultType) =>
1000999
generateStringResultCallIfArgsNotNull(ctx, Seq(operand), targetType) {
10011000
operandTerm =>
10021001
s"${localTimeToStringCode(ctx, operand.resultType, operandTerm.head)}"
@@ -1085,7 +1084,7 @@ object ScalarOperatorGens {
10851084

10861085
// String -> NUMERIC TYPE (not Character)
10871086
case (VARCHAR | CHAR, _)
1088-
if TypeCheckUtils.isNumeric(targetType) =>
1087+
if isNumeric(targetType) =>
10891088
targetType match {
10901089
case dt: DecimalType =>
10911090
generateUnaryOperatorIfNotNull(ctx, targetType, operand) { operandTerm =>
@@ -1180,7 +1179,7 @@ object ScalarOperatorGens {
11801179
}
11811180

11821181
// Boolean -> NUMERIC TYPE
1183-
case (BOOLEAN, _) if TypeCheckUtils.isNumeric(targetType) =>
1182+
case (BOOLEAN, _) if isNumeric(targetType) =>
11841183
val targetTypeTerm = primitiveTypeTermForType(targetType)
11851184
generateUnaryOperatorIfNotNull(ctx, targetType, operand) {
11861185
operandTerm => s"($targetTypeTerm) ($operandTerm ? 1 : 0)"
@@ -1792,7 +1791,7 @@ object ScalarOperatorGens {
17921791
val resultTypeTerm = boxedTypeTermForType(widerType.get)
17931792

17941793
def castIfNumeric(t: GeneratedExpression): String = {
1795-
if (TypeCheckUtils.isNumeric(widerType.get)) {
1794+
if (isNumeric(widerType.get)) {
17961795
s"${numericCasting(t.resultType, widerType.get).apply(t.resultTerm)}"
17971796
} else {
17981797
s"${t.resultTerm}"

0 commit comments

Comments
 (0)