Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
murphyatwork committed Jan 28, 2022
1 parent 311c81e commit 0be97bf
Showing 1 changed file with 0 additions and 136 deletions.
136 changes: 0 additions & 136 deletions fe/fe-core/src/main/java/com/starrocks/catalog/PrimitiveType.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0be97bf

Please sign in to comment.