You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "fuweng11 (via GitHub)" <gi...@apache.org> on 2023/04/12 02:11:49 UTC

[GitHub] [inlong] fuweng11 opened a new pull request, #7824: [INLONG-7823][Manager] Supports creating clickhouse tables using the ReplicatedMergeTree engine

fuweng11 opened a new pull request, #7824:
URL: https://github.com/apache/inlong/pull/7824

   
   
   ### Prepare a Pull Request
   
   - Fixes #7823 
   
   ### Motivation
   
   Supports creating clickhouse tables using the ReplicatedMergeTree engine.
   
   ### Modifications
   
   Supports creating clickhouse tables using the ReplicatedMergeTree engine.
   
   


-- 
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@inlong.apache.org

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


[GitHub] [inlong] dockerzhang merged pull request #7824: [INLONG-7823][Manager] Supports creating clickhouse tables using the ReplicatedMergeTree engine

Posted by "dockerzhang (via GitHub)" <gi...@apache.org>.
dockerzhang merged PR #7824:
URL: https://github.com/apache/inlong/pull/7824


-- 
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@inlong.apache.org

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


[GitHub] [inlong] vernedeng commented on a diff in pull request #7824: [INLONG-7823][Manager] Supports creating clickhouse tables using the ReplicatedMergeTree engine

Posted by "vernedeng (via GitHub)" <gi...@apache.org>.
vernedeng commented on code in PR #7824:
URL: https://github.com/apache/inlong/pull/7824#discussion_r1163498744


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/ck/ClickHouseSqlBuilder.java:
##########
@@ -66,7 +67,10 @@ public static String buildCreateTableSql(ClickHouseTableInfo table) {
         }
         // Construct columns and partition columns
         sql.append(buildCreateColumnsSql(table.getFieldInfoList()));
-        if (StringUtils.isNotEmpty(table.getEngine())) {
+        if (StringUtils.isNotBlank(table.getEngine()) && Objects.equals("ReplicatedMergeTree", table.getEngine())) {
+            sql.append(
+                    " ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/{database}/{table}/data', '{replica}')");

Review Comment:
   Is there only one engine? 
   I think it's better to make an engine emun, instead of making branch for each engine type.



-- 
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@inlong.apache.org

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


[GitHub] [inlong] fuweng11 commented on a diff in pull request #7824: [INLONG-7823][Manager] Supports creating clickhouse tables using the ReplicatedMergeTree engine

Posted by "fuweng11 (via GitHub)" <gi...@apache.org>.
fuweng11 commented on code in PR #7824:
URL: https://github.com/apache/inlong/pull/7824#discussion_r1163501825


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/ck/ClickHouseSqlBuilder.java:
##########
@@ -66,7 +67,10 @@ public static String buildCreateTableSql(ClickHouseTableInfo table) {
         }
         // Construct columns and partition columns
         sql.append(buildCreateColumnsSql(table.getFieldInfoList()));
-        if (StringUtils.isNotEmpty(table.getEngine())) {
+        if (StringUtils.isNotBlank(table.getEngine()) && Objects.equals("ReplicatedMergeTree", table.getEngine())) {
+            sql.append(
+                    " ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/{database}/{table}/data', '{replica}')");

Review Comment:
   This only `ReplicatedMergeTree`.



-- 
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@inlong.apache.org

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