Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikeW committed May 29, 2023
1 parent 66dc210 commit 4c7ba7c
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2023 RisingWave Labs
//
// Licensed 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 com.risingwave.connector.api;

import com.risingwave.proto.Data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import com.risingwave.connector.IcebergSink;
import com.risingwave.connector.api.TableSchema;
import com.risingwave.connector.api.sink.ArraySinkRow;
import com.risingwave.proto.Data;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
Expand Down Expand Up @@ -62,9 +61,9 @@ public class IcebergSinkPartitionTest {
new TableSchema(
Lists.newArrayList("id", "name", "part"),
Lists.newArrayList(
Data.DataType.TypeName.INT32,
Data.DataType.TypeName.VARCHAR,
Data.DataType.TypeName.VARCHAR),
DataType.newBuilder().setTypeName(DataType.TypeName.INT32).build(),
DataType.newBuilder().setTypeName(DataType.TypeName.VARCHAR).build(),
DataType.newBuilder().setTypeName(DataType.TypeName.VARCHAR).build()),
Lists.newArrayList("id"));

private void createMockTable() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import com.risingwave.connector.UpsertIcebergSink;
import com.risingwave.connector.api.TableSchema;
import com.risingwave.connector.api.sink.ArraySinkRow;
import com.risingwave.proto.Data;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
Expand Down Expand Up @@ -57,9 +56,9 @@ public class UpsertIcebergSinkPartitionTest {
new TableSchema(
Lists.newArrayList("id", "name", "part"),
Lists.newArrayList(
Data.DataType.TypeName.INT32,
Data.DataType.TypeName.VARCHAR,
Data.DataType.TypeName.VARCHAR),
DataType.newBuilder().setTypeName(DataType.TypeName.INT32).build(),
DataType.newBuilder().setTypeName(DataType.TypeName.VARCHAR).build(),
DataType.newBuilder().setTypeName(DataType.TypeName.VARCHAR).build()),
Lists.newArrayList("id"));

private void createMockTable() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,18 @@ public void testPermissionCheck() throws SQLException {
.addColumns(
ConnectorServiceProto.TableSchema.Column.newBuilder()
.setName("o_key")
.setDataType(Data.DataType.TypeName.INT64)
.setDataType(
Data.DataType.newBuilder()
.setTypeName(Data.DataType.TypeName.INT64)
.build())
.build())
.addColumns(
ConnectorServiceProto.TableSchema.Column.newBuilder()
.setName("o_val")
.setDataType(Data.DataType.TypeName.INT32)
.setDataType(
Data.DataType.newBuilder()
.setTypeName(Data.DataType.TypeName.INT32)
.build())
.build())
.addPkIndices(0)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

import org.postgresql.ds.common.PGObjectFactory;
import org.postgresql.util.PGInterval;
import org.postgresql.util.PGobject;
import org.slf4j.Logger;
Expand Down

0 comments on commit 4c7ba7c

Please sign in to comment.