[bug](datetimev2) fix wrong info when show create table (#15422)
* [bug](datetimev2) fix wrong info when show create table * update
This commit is contained in:
@ -582,7 +582,7 @@ public class ScalarType extends Type {
|
||||
}
|
||||
break;
|
||||
case DATETIMEV2:
|
||||
stringBuilder.append("datetime").append("(").append(scale).append(")");
|
||||
stringBuilder.append("datetimev2").append("(").append(scale).append(")");
|
||||
break;
|
||||
case TIME:
|
||||
stringBuilder.append("time");
|
||||
|
||||
@ -125,7 +125,7 @@ public class ColumnTypeTest {
|
||||
public void testDatetimeV2() throws AnalysisException {
|
||||
TypeDef type = TypeDef.createDatetimeV2(3);
|
||||
type.analyze(null);
|
||||
Assert.assertEquals("datetime(3)", type.toString());
|
||||
Assert.assertEquals("datetimev2(3)", type.toString());
|
||||
Assert.assertEquals(PrimitiveType.DATETIMEV2, type.getType().getPrimitiveType());
|
||||
Assert.assertEquals(ScalarType.DATETIME_PRECISION, ((ScalarType) type.getType()).getScalarPrecision());
|
||||
Assert.assertEquals(3, ((ScalarType) type.getType()).getScalarScale());
|
||||
|
||||
Reference in New Issue
Block a user