libenchao commented on code in PR #22259: URL: https://github.com/apache/flink/pull/22259#discussion_r1150393962
########## flink-table/flink-sql-jdbc-driver/src/main/java/org/apache/flink/table/jdbc/FlinkResultSet.java: ########## @@ -0,0 +1,453 @@ +/* + * 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.flink.table.jdbc; + +import org.apache.flink.table.catalog.ResolvedSchema; +import org.apache.flink.table.client.gateway.StatementResult; +import org.apache.flink.table.data.RowData; +import org.apache.flink.table.data.StringData; +import org.apache.flink.table.types.DataType; +import org.apache.flink.table.types.logical.DecimalType; +import org.apache.flink.types.RowKind; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.sql.Array; +import java.sql.Date; +import java.sql.ResultSetMetaData; +import java.sql.SQLDataException; +import java.sql.SQLException; +import java.sql.SQLFeatureNotSupportedException; +import java.sql.Statement; +import java.sql.Time; +import java.sql.Timestamp; +import java.util.Calendar; +import java.util.List; + +import static org.apache.flink.util.Preconditions.checkNotNull; + +/** + * ResultSet for flink jdbc driver. Only Batch Mode queries are supported. If you force to submit + * streaming queries, you may get unrecognized updates, deletions and other results. + */ +public class FlinkResultSet extends BaseResultSet { + private final List<DataType> dataTypeList; + private final List<String> columnNameList; + private final Statement statement; + private final StatementResult result; + private RowData currentRow; + private boolean wasNull; + + private volatile boolean closed; + + public FlinkResultSet(Statement statement, StatementResult result) { + // TODO use Utils.checkNotNull to get rid of flink-core Review Comment: Since FLINK-31538 has been merged, could you rebase to the latest master? ########## flink-table/flink-sql-jdbc-driver-bundle/pom.xml: ########## @@ -39,11 +39,19 @@ <groupId>org.apache.flink</groupId> <artifactId>flink-sql-jdbc-driver</artifactId> <version>${project.version}</version> + <scope>provided</scope> Review Comment: IIUC, `scope` is unnecessary when we use shade plugin with 'include' (a.k.a, white list). See also 'flink-table-api-java-uber'. -- 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]
