From 0be97bfd326e9fe180fdb16df91c02cc943581cc Mon Sep 17 00:00:00 2001 From: mofei Date: Fri, 28 Jan 2022 10:31:13 +0800 Subject: [PATCH] fix conflict --- .../com/starrocks/catalog/PrimitiveType.java | 136 ------------------ 1 file changed, 136 deletions(-) diff --git a/fe/fe-core/src/main/java/com/starrocks/catalog/PrimitiveType.java b/fe/fe-core/src/main/java/com/starrocks/catalog/PrimitiveType.java index a939b0ea9bac1..d580c59c275e5 100644 --- a/fe/fe-core/src/main/java/com/starrocks/catalog/PrimitiveType.java +++ b/fe/fe-core/src/main/java/com/starrocks/catalog/PrimitiveType.java @@ -297,142 +297,6 @@ public static int getDefaultScaleOfDecimal(PrimitiveType t) { } } - // TODO(mofei) refactor it - public static String getUdfTypeName(PrimitiveType t) { - switch (t) { - case BOOLEAN: - return "boolean_val"; - case TINYINT: - return "tiny_int_val"; - case SMALLINT: - return "small_int_val"; - case INT: - return "int_val"; - case BIGINT: - return "big_int_val"; - case LARGEINT: - return "large_int_val"; - case FLOAT: - return "float_val"; - case DOUBLE: - case TIME: - return "double_val"; - case VARCHAR: - case CHAR: - case HLL: - case BITMAP: - case PERCENTILE: - return "string_val"; - case DATE: - case DATETIME: - return "datetime_val"; - case DECIMALV2: - return "decimalv2_val"; - case DECIMAL32: - return "decimal32_val"; - case DECIMAL64: - return "decimal64_val"; - case DECIMAL128: - return "decimal128_val"; - case JSON: - return "json_val"; - default: - Preconditions.checkState(false, t.toString()); - return ""; - } - } - - // TODO(mofei) refactor it - public static String getUdfType(PrimitiveType t) { - switch (t) { - case NULL_TYPE: - return "AnyVal"; - case BOOLEAN: - return "BooleanVal"; - case TINYINT: - return "TinyIntVal"; - case SMALLINT: - return "SmallIntVal"; - case INT: - return "IntVal"; - case BIGINT: - return "BigIntVal"; - case LARGEINT: - return "LargeIntVal"; - case FLOAT: - return "FloatVal"; - case DOUBLE: - case TIME: - return "DoubleVal"; - case VARCHAR: - case CHAR: - case HLL: - case BITMAP: - case PERCENTILE: - return "StringVal"; - case DATE: - case DATETIME: - return "DateTimeVal"; - case DECIMALV2: - return "DecimalV2Val"; - case DECIMAL32: - return "Decimal32"; - case DECIMAL64: - return "Decimal64"; - case DECIMAL128: - return "Decimal128"; - case JSON: - return "JSONVal"; - default: - Preconditions.checkState(false, t.toString()); - return ""; - } - } - - public static String getBEFnArgTypeName(PrimitiveType type) { - switch (type) { - case BOOLEAN: - return "_boolean_val"; - case TINYINT: - return "_tiny_int_val"; - case SMALLINT: - return "_small_int_val"; - case INT: - return "_int_val"; - case BIGINT: - return "_big_int_val"; - case LARGEINT: - return "_large_int_val"; - case FLOAT: - return "_float_val"; - case DOUBLE: - case TIME: - return "_double_val"; - case CHAR: - case VARCHAR: - case HLL: - case BITMAP: - case PERCENTILE: - return "_string_val"; - case DATE: - case DATETIME: - return "_datetime_val"; - case DECIMALV2: - return "_decimalv2_val"; - case DECIMAL32: - return "_decimal32_val"; - case DECIMAL64: - return "_decimal64_val"; - case DECIMAL128: - return "_decimal128_val"; - case JSON: - return "_json_val"; - default: - Preconditions.checkState(false, "Argument type not supported: " + type); - return ""; - } - } - public void setTimeType() { isTimeType = true; }