slinkydeveloper commented on a change in pull request #17598:
URL: https://github.com/apache/flink/pull/17598#discussion_r768837234
##########
File path:
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/utils/JsonPlanTestBase.java
##########
@@ -92,17 +92,27 @@ protected void createTestValuesSourceTable(
@Nullable String partitionFields,
Map<String, String> extraProperties) {
checkArgument(fieldNameAndTypes.length > 0);
- String partitionedBy =
- StringUtils.isNullOrWhitespaceOnly(partitionFields)
- ? ""
- : "\n partitioned by (" + partitionFields + ") \n";
+
String dataId = TestValuesTableFactory.registerData(data);
Map<String, String> properties = new HashMap<>();
properties.put("connector", "values");
properties.put("data-id", dataId);
properties.put("bounded", "true");
properties.put("disable-lookup", "true");
properties.putAll(extraProperties);
+ createTestSourceTable(tableName, fieldNameAndTypes, partitionFields,
properties);
+ }
+
+ protected void createTestSourceTable(
+ String tableName,
+ String[] fieldNameAndTypes,
+ @Nullable String partitionFields,
+ Map<String, String> properties) {
+ checkArgument(fieldNameAndTypes.length > 0);
+ String partitionedBy =
+ StringUtils.isNullOrWhitespaceOnly(partitionFields)
+ ? ""
+ : "\n partitioned by (" + partitionFields + ") \n";
Review comment:
please remove this function usage and rewrite it using `Stream`s instead
--
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]