This is an automated email from the ASF dual-hosted git repository.

panxiaolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 4336aaa01a [bug](datetimev2) fix wrong info when show create table 
(#15422)
4336aaa01a is described below

commit 4336aaa01a21fe5271a665272a8bba570520139c
Author: Gabriel <gabrielleeb...@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 9a69d908cd..8779c2d7dd 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-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to