kipshi commented on a change in pull request #3036:
URL: https://github.com/apache/incubator-inlong/pull/3036#discussion_r823306289
##########
File path:
inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/util/InlongStreamSinkTransfer.java
##########
@@ -244,21 +230,32 @@ private static HiveSinkRequest
createHiveRequest(StreamSink streamSink, InlongSt
hiveSinkRequest.setPrimaryPartition(hiveSink.getPrimaryPartition());
hiveSinkRequest.setSecondaryPartition(hiveSink.getSecondaryPartition());
if (CollectionUtils.isNotEmpty(hiveSink.getStreamFields())) {
- List<SinkFieldRequest> fieldRequests = hiveSink.getStreamFields()
- .stream()
- .map(streamField -> {
- SinkFieldRequest storageFieldRequest = new
SinkFieldRequest();
-
storageFieldRequest.setFieldName(streamField.getFieldName());
-
storageFieldRequest.setFieldType(streamField.getFieldType().toString());
-
storageFieldRequest.setFieldComment(streamField.getFieldComment());
- return storageFieldRequest;
- })
- .collect(Collectors.toList());
+ List<SinkFieldRequest> fieldRequests =
createSinkFields(streamSink.getStreamFields(),
+ streamInfo.getFieldList());
hiveSinkRequest.setFieldList(fieldRequests);
}
return hiveSinkRequest;
}
+ private static List<SinkFieldRequest> createSinkFields(List<StreamField>
sinkFields,
Review comment:
not necessary, StreamField is class for field definition in Client
--
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]