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/22 07:45:24 UTC

[doris] 04/04: [fix](jdbc) fix create table like table of jdbc error (#15179)

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 9c0239ef40506e791c21f03aaf25ed48853cb9c2
Author: xueweizhang <zx...@163.com>
AuthorDate: Wed Dec 21 08:56:43 2022 +0800

    [fix](jdbc) fix create table like table of jdbc error (#15179)
    
    when create table like table of jdbc, it will get error like
    'errCode = 2, detailMessage = Failed to execute CREATE TABLE LIKE baseall_mysql.
    Reason: errCode = 2, detailMessage = property table_type must be set'
    this pr fix it.
---
 fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
index af2393e9e1..da7df2caef 100755
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
@@ -3137,7 +3137,8 @@ public class Env {
             addTableComment(jdbcTable, sb);
             sb.append("\nPROPERTIES (\n");
             sb.append("\"resource\" = \"").append(jdbcTable.getResourceName()).append("\",\n");
-            sb.append("\"table\" = \"").append(jdbcTable.getJdbcTable()).append("\"");
+            sb.append("\"table\" = \"").append(jdbcTable.getJdbcTable()).append("\",\n");
+            sb.append("\"table_type\" = \"").append(jdbcTable.getJdbcTypeName()).append("\"");
             sb.append("\n)");
         }
 


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