[cleanup](fe) cleanup useless code. (#16129)
* [cleanup](Nereids): cleanup useless code. * revert ErrorCode.java
This commit is contained in:
@ -1096,51 +1096,6 @@ public class ScalarType extends Type {
|
||||
return PrimitiveType.isImplicitCast(type.getPrimitiveType(), targetType.getPrimitiveType());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStorageLayoutBytes() {
|
||||
switch (type) {
|
||||
case BOOLEAN:
|
||||
case TINYINT:
|
||||
return 1;
|
||||
case SMALLINT:
|
||||
return 2;
|
||||
case INT:
|
||||
case FLOAT:
|
||||
case DECIMAL32:
|
||||
return 4;
|
||||
case BIGINT:
|
||||
case TIME:
|
||||
case DATETIME:
|
||||
// TODO(Gabriel): unify execution engine and storage engine
|
||||
case TIMEV2:
|
||||
case DATETIMEV2:
|
||||
case DECIMAL64:
|
||||
return 8;
|
||||
case LARGEINT:
|
||||
case DECIMALV2:
|
||||
case DECIMAL128:
|
||||
return 16;
|
||||
case DOUBLE:
|
||||
return 12;
|
||||
case DATEV2:
|
||||
case DATE:
|
||||
return 3;
|
||||
case CHAR:
|
||||
case VARCHAR:
|
||||
return len;
|
||||
case HLL:
|
||||
return 16385;
|
||||
case BITMAP:
|
||||
return 1024; // this is a estimated value
|
||||
case QUANTILE_STATE:
|
||||
return 1024; // TODO(weixiang): no used in FE, figure out whether can delete this funcion?
|
||||
case STRING:
|
||||
return 1024;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TColumnType toColumnTypeThrift() {
|
||||
TColumnType thrift = new TColumnType();
|
||||
|
||||
@ -1704,13 +1704,9 @@ public abstract class Type {
|
||||
}
|
||||
}
|
||||
|
||||
public int getStorageLayoutBytes() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int getIndexSize() {
|
||||
if (this.getPrimitiveType() == PrimitiveType.CHAR) {
|
||||
return ((ScalarType) this).getLength();
|
||||
return this.getLength();
|
||||
} else {
|
||||
return this.getPrimitiveType().getOlapColumnIndexSize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user