You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/12/29 04:06:23 UTC
[doris] 01/03: [bug](datetimev2) fix wrong info when show create table (#15422)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
commit 9b552da5cad7d84c9a2d01295e944253fdc8820b
Author: Gabriel <ga...@gmail.com>
AuthorDate: Wed Dec 28 19:55:43 2022 +0800
[bug](datetimev2) fix wrong info when show create table (#15422)
* [bug](datetimev2) fix wrong info when show create table
* update
---
fe/fe-core/src/main/java/org/apache/doris/catalog/ScalarType.java | 2 +-
fe/fe-core/src/test/java/org/apache/doris/catalog/ColumnTypeTest.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/ScalarType.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/ScalarType.java
index 4564af5094..3ce7c73c5c 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/ScalarType.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/ScalarType.java
@@ -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");
diff --git a/fe/fe-core/src/test/java/org/apache/doris/catalog/ColumnTypeTest.java b/fe/fe-core/src/test/java/org/apache/doris/catalog/ColumnTypeTest.java
index 7d88a696f9..98e5d5c010 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/catalog/ColumnTypeTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/catalog/ColumnTypeTest.java
@@ -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());
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org