You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/04/03 14:05:27 UTC

[GitHub] [incubator-doris] caiconghui commented on a change in pull request #8838: [fix](ut) fix fe run CreateTableAsSelectStmtTest and UserPropertyTest failed

caiconghui commented on a change in pull request #8838:
URL: https://github.com/apache/incubator-doris/pull/8838#discussion_r841227740



##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java
##########
@@ -3116,12 +3116,12 @@ public void createTableAsSelect(CreateTableAsSelectStmt stmt) throws DdlExceptio
                 }
                 TypeDef typeDef;
                 Expr resultExpr = resultExprs.get(i);
-                // varchar/char transfer to string
-                if (resultExpr.getType().isStringType()) {
+                if (resultExpr.getType().isStringType() && resultExpr.getType().getLength() < 0) {

Review comment:
       -1 means that we don't know the varchar length ,so we transfer it to string, but if we know the length of string, just keep it same as before




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org