XiaoYou201 commented on code in PR #10700: URL: https://github.com/apache/inlong/pull/10700#discussion_r1689058825
########## inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/jdbc/src/main/java/org/apache/inlong/sort/jdbc/dialect/jdbc/JdbcDialect.java: ########## @@ -0,0 +1,244 @@ +/* + * 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.inlong.sort.jdbc.dialect.jdbc; + +import org.apache.inlong.sort.jdbc.converter.clickhouse.ClickHouseRowConverter; + +import org.apache.commons.lang3.tuple.Pair; +import org.apache.flink.connector.jdbc.converter.JdbcRowConverter; +import org.apache.flink.connector.jdbc.dialect.AbstractDialect; +import org.apache.flink.table.types.logical.LogicalTypeRoot; +import org.apache.flink.table.types.logical.RowType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; + +import static java.lang.String.format; + +/** + * JDBC dialect for ClickHouse SQL. + */ +public class JdbcDialect extends AbstractDialect { + + public static final Logger LOG = LoggerFactory.getLogger(JdbcDialect.class); + + // Define MAX/MIN precision of TIMESTAMP type according to ClickHouse docs: + // https://clickhouse.com/docs/zh/sql-reference/data-types/datetime64 + private static final int MAX_TIMESTAMP_PRECISION = 8; + private static final int MIN_TIMESTAMP_PRECISION = 0; + + // Define MAX/MIN precision of DECIMAL type according to ClickHouse docs: + // https://clickhouse.com/docs/zh/sql-reference/data-types/decimal/ + private static final int MAX_DECIMAL_PRECISION = 128; + private static final int MIN_DECIMAL_PRECISION = 32; + private static final String POINT = "."; + + @Override + public String dialectName() { + return "mysql"; + } Review Comment: dialectName is mysql?the url of oceanbase should be "jdbc:oceanbase" through jdbc protocol -- 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-unsubscr...@inlong.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org