Skip to content

Commit 40ee916

Browse files
committed
fix postcommits
1 parent bf8bfff commit 40ee916

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/store/InMemoryMetaStore.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ protected void validateTableType(Table table) {
9999

100100
@Override
101101
public void registerProvider(TableProvider provider) {
102-
System.out.printf("xxx register provider!!! type: '%s'%n", provider.getTableType());
103102
if (providers.containsKey(provider.getTableType())) {
104103
throw new IllegalArgumentException(
105104
"Provider is already registered for table type: " + provider.getTableType());

sdks/java/extensions/sql/src/test/java/org/apache/beam/sdk/extensions/sql/PubsubToIcebergIT.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -149,18 +149,15 @@ public void testSimpleInsertWithPartitionedFields() throws Exception {
149149
+ "' \n"
150150
+ "TBLPROPERTIES '{ \"timestampAttributeKey\" : \"ts\" }'";
151151
String icebergTableString =
152-
"CREATE EXTERNAL TABLE iceberg_table( \n"
152+
format("CREATE EXTERNAL TABLE %s( \n", tableIdentifier)
153153
+ " id BIGINT, \n"
154154
+ " name VARCHAR \n "
155155
+ ") \n"
156156
+ "TYPE 'iceberg' \n"
157157
+ "PARTITIONED BY('id', 'truncate(name, 3)') \n"
158-
+ "LOCATION '"
159-
+ tableIdentifier
160-
+ "' \n"
161158
+ "TBLPROPERTIES '{ \"triggering_frequency_seconds\" : 10 }'";
162159
String insertStatement =
163-
"INSERT INTO iceberg_table \n"
160+
format("INSERT INTO %s \n", tableIdentifier)
164161
+ "SELECT \n"
165162
+ " pubsub_topic.payload.id, \n"
166163
+ " pubsub_topic.payload.name \n"
@@ -207,18 +204,15 @@ public void testSimpleInsertFlat() throws Exception {
207204
+ pubsub.topicPath()
208205
+ "' \n"
209206
+ "TBLPROPERTIES '{ \"timestampAttributeKey\" : \"ts\" }'";
210-
String bqTableString =
211-
"CREATE EXTERNAL TABLE iceberg_table( \n"
207+
String icebergTableString =
208+
format("CREATE EXTERNAL TABLE %s( \n", tableIdentifier)
212209
+ " id BIGINT, \n"
213210
+ " name VARCHAR \n "
214211
+ ") \n"
215212
+ "TYPE 'iceberg' \n"
216-
+ "LOCATION '"
217-
+ tableIdentifier
218-
+ "' \n"
219213
+ "TBLPROPERTIES '{ \"triggering_frequency_seconds\" : 10 }'";
220214
String insertStatement =
221-
"INSERT INTO iceberg_table \n"
215+
format("INSERT INTO %s \n", tableIdentifier)
222216
+ "SELECT \n"
223217
+ " id, \n"
224218
+ " name \n"
@@ -229,7 +223,7 @@ public void testSimpleInsertFlat() throws Exception {
229223
.withDdlString(createCatalogDdl)
230224
.withDdlString(setCatalogDdl)
231225
.withDdlString(pubsubTableString)
232-
.withDdlString(bqTableString));
226+
.withDdlString(icebergTableString));
233227
pipeline.run();
234228

235229
// Block until a subscription for this topic exists

0 commit comments

Comments
 (0)