diqiu50 commented on code in PR #9878: URL: https://github.com/apache/gravitino/pull/9878#discussion_r2793287680
########## integration-test-common/src/test/java/org/apache/gravitino/integration/test/container/ZooKeeperContainer.java: ########## @@ -0,0 +1,82 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.gravitino.integration.test.container; + +import com.google.common.collect.ImmutableSet; +import java.time.Duration; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testcontainers.containers.Network; + Review Comment: Why don’t we use ClickHouse Keeper? A single ClickHouse container should be good enough. ########## catalogs-contrib/catalog-jdbc-clickhouse/src/main/java/org/apache/gravitino/catalog/clickhouse/operations/ClickHouseTableOperations.java: ########## @@ -93,8 +94,7 @@ ARRAY JOIN arrayZip(splitByChar(',', primary_key), arrayEnumerate(splitByChar(', protected List<Index> getIndexes(Connection connection, String databaseName, String tableName) { // cause clickhouse not impl getPrimaryKeys yet, ref: // https://github.com/ClickHouse/clickhouse-java/issues/1625 - String sql = - QUERY_INDEXES_SQL.formatted(quoteIdentifier(databaseName), quoteIdentifier(tableName)); + String sql = QUERY_INDEXES_SQL.formatted(databaseName, tableName); Review Comment: Why do you remove the quote? ########## common/src/main/java/org/apache/gravitino/dto/rel/expressions/FuncExpressionDTO.java: ########## @@ -64,6 +65,17 @@ public ArgType argType() { return ArgType.FUNCTION; } + /** + * @return The string representation of the function expression. + */ + @Override + public String toString() { + if (functionArgs.length == 0) { + return functionName + "()"; + } + return functionName + "(" + String.join(", ", Arrays.toString(functionArgs)) + ")"; + } Review Comment: Is this a problem? ########## catalogs-contrib/catalog-jdbc-clickhouse/src/main/java/org/apache/gravitino/catalog/clickhouse/operations/ClickHouseTableOperations.java: ########## @@ -269,7 +281,7 @@ private ClickHouseTablePropertiesMetadata.ENGINE appendTableEngine( Map<String, String> properties, StringBuilder sqlBuilder, JdbcColumn[] columns) { ClickHouseTablePropertiesMetadata.ENGINE engine = ENGINE_PROPERTY_ENTRY.getDefaultValue(); if (MapUtils.isNotEmpty(properties)) { - String userSetEngine = properties.get(CLICKHOUSE_ENGINE_KEY); + String userSetEngine = properties.get(GRAVITINO_ENGINE_KEY); Review Comment: I think `CLICKHOUSE_ENGINE_KEY` is better, Why do you change it ########## catalogs/catalog-jdbc-common/src/main/java/org/apache/gravitino/catalog/jdbc/operation/JdbcTableOperations.java: ########## @@ -142,9 +142,9 @@ public void create( SortOrder[] sortOrders) throws TableAlreadyExistsException { LOG.info("Attempting to create table {} in database {}", tableName, databaseName); + String s; Review Comment: Move the variable `s` into try catch. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
