Skip to content

Commit f483517

Browse files
committed
Handling review comments
1 parent 3318b48 commit f483517

File tree

5 files changed

+51
-33
lines changed

5 files changed

+51
-33
lines changed

fluss-flink/fluss-flink-2.2/src/main/java/org/apache/fluss/flink/adapter/FlinkSinkAdapter.java renamed to fluss-flink/fluss-flink-2.2/src/main/java/org/apache/fluss/flink/adapter/SinkAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*
3131
* <p>TODO: remove this class when no longer support all the Flink 1.x series.
3232
*/
33-
public abstract class FlinkSinkAdapter<InputT> implements Sink<InputT> {
33+
public abstract class SinkAdapter<InputT> implements Sink<InputT> {
3434

3535
@Override
3636
public SinkWriter<InputT> createWriter(WriterInitContext writerInitContext) throws IOException {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package org.apache.fluss.flink.adapter;
19+
20+
/** Test for {@link MultipleParameterToolAdapter} in flink 2.2. */
21+
public class Flink22MultipleParameterToolTest extends FlinkMultipleParameterToolTest {}

fluss-flink/fluss-flink-2.2/src/test/java/org/apache/fluss/flink/catalog/FlinkCatalog22Test.java renamed to fluss-flink/fluss-flink-2.2/src/test/java/org/apache/fluss/flink/catalog/Flink22CatalogTest.java

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,16 @@
1818
package org.apache.fluss.flink.catalog;
1919

2020
import org.apache.flink.table.api.DataTypes;
21-
import org.apache.flink.table.api.Schema;
22-
import org.apache.flink.table.catalog.CatalogMaterializedTable;
2321
import org.apache.flink.table.catalog.Column;
2422
import org.apache.flink.table.catalog.DefaultIndex;
25-
import org.apache.flink.table.catalog.IntervalFreshness;
26-
import org.apache.flink.table.catalog.ResolvedCatalogMaterializedTable;
2723
import org.apache.flink.table.catalog.ResolvedSchema;
2824
import org.apache.flink.table.catalog.UniqueConstraint;
2925

3026
import java.util.Arrays;
3127
import java.util.Collections;
32-
import java.util.Map;
3328

3429
/** Test for {@link FlinkCatalog}. */
35-
public class FlinkCatalog22Test extends FlinkCatalogTest {
30+
public class Flink22CatalogTest extends FlinkCatalogTest {
3631

3732
protected ResolvedSchema createSchema() {
3833
return new ResolvedSchema(
@@ -46,30 +41,4 @@ protected ResolvedSchema createSchema() {
4641
DefaultIndex.newIndex(
4742
"INDEX_first_third", Arrays.asList("first", "third"))));
4843
}
49-
50-
protected CatalogMaterializedTable newCatalogMaterializedTable(
51-
ResolvedSchema resolvedSchema,
52-
CatalogMaterializedTable.RefreshMode refreshMode,
53-
Map<String, String> options) {
54-
CatalogMaterializedTable origin =
55-
CatalogMaterializedTable.newBuilder()
56-
.schema(Schema.newBuilder().fromResolvedSchema(resolvedSchema).build())
57-
.comment("test comment")
58-
.options(options)
59-
.partitionKeys(Collections.emptyList())
60-
.definitionQuery("select first, second, third from t")
61-
.freshness(IntervalFreshness.of("5", IntervalFreshness.TimeUnit.SECOND))
62-
.logicalRefreshMode(
63-
refreshMode == CatalogMaterializedTable.RefreshMode.CONTINUOUS
64-
? CatalogMaterializedTable.LogicalRefreshMode.CONTINUOUS
65-
: CatalogMaterializedTable.LogicalRefreshMode.FULL)
66-
.refreshMode(refreshMode)
67-
.refreshStatus(CatalogMaterializedTable.RefreshStatus.INITIALIZING)
68-
.build();
69-
return new ResolvedCatalogMaterializedTable(
70-
origin,
71-
resolvedSchema,
72-
refreshMode,
73-
IntervalFreshness.of("5", IntervalFreshness.TimeUnit.SECOND));
74-
}
7544
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package org.apache.fluss.flink.catalog;
19+
20+
/** IT case for materialized table in Flink 2.2. */
21+
public class Flink22MaterializedTableITCase extends MaterializedTableITCase {}

fluss-test-coverage/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@
6868
<scope>compile</scope>
6969
</dependency>
7070

71+
<dependency>
72+
<groupId>org.apache.fluss</groupId>
73+
<artifactId>fluss-flink-2.2</artifactId>
74+
<version>${project.version}</version>
75+
<scope>compile</scope>
76+
</dependency>
77+
7178

7279
<dependency>
7380
<groupId>org.apache.fluss</groupId>

0 commit comments

Comments
 (0)