Skip to content

Commit

Permalink
[Enhancement] Remove common-compress dependency
Browse files Browse the repository at this point in the history
Signed-off-by: PengFei Li <[email protected]>
  • Loading branch information
banmoy committed Dec 3, 2023
1 parent 252e708 commit c7b79f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@

import com.starrocks.connector.flink.table.sink.StarRocksSinkOptions;
import com.starrocks.connector.flink.table.source.StarRocksSourceOptions;
import org.apache.commons.compress.utils.Lists;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -66,6 +65,7 @@
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
Expand Down Expand Up @@ -278,7 +278,7 @@ public CatalogBaseTable getTable(ObjectPath tablePath) throws TableNotExistExcep
properties.putAll(getSourceConfig(tablePath.getDatabaseName(), tablePath.getObjectName()));
properties.putAll(getSinkConfig(tablePath.getDatabaseName(), tablePath.getObjectName()));

return CatalogTable.of(flinkSchema, starRocksTable.getComment().orElse(null), Lists.newArrayList(), properties);
return CatalogTable.of(flinkSchema, starRocksTable.getComment().orElse(null), new ArrayList<>(), properties);
} catch (StarRocksCatalogException e) {
throw new CatalogException(
String.format("Failed to get table %s in catalog %s", tablePath.getFullName(), getName()), e);
Expand Down Expand Up @@ -387,7 +387,7 @@ private int executeUpdateStatement(String sql) throws SQLException {
private List<String> executeSingleColumnStatement(String sql, Object... params) {
try (Connection conn = getConnection();
PreparedStatement statement = conn.prepareStatement(sql)) {
List<String> columnValues = Lists.newArrayList();
List<String> columnValues = new ArrayList<>();
if (params != null) {
for (int i = 0; i < params.length; i++) {
statement.setObject(i + 1, params[i]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.apache.flink.util.Preconditions;
import org.apache.flink.util.StringUtils;

import org.apache.commons.compress.utils.Lists;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -453,7 +452,7 @@ private AlterJobState getAlterJobState(String databaseName, String tableName)
private List<String> executeSingleColumnStatement(String sql) throws SQLException {
try (Connection conn = getConnection();
PreparedStatement statement = conn.prepareStatement(sql)) {
List<String> columnValues = Lists.newArrayList();
List<String> columnValues = new ArrayList<>();
try (ResultSet rs = statement.executeQuery()) {
while (rs.next()) {
String columnValue = rs.getString(1);
Expand Down

0 comments on commit c7b79f0

Please sign in to comment.