healchow commented on code in PR #6064:
URL: https://github.com/apache/inlong/pull/6064#discussion_r983419010


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sink/iceberg/IcebergSinkOperator.java:
##########
@@ -83,6 +87,15 @@ public StreamSink getFromEntity(StreamSinkEntity entity) {
         }
 
         IcebergSinkDTO dto = IcebergSinkDTO.getFromJson(entity.getExtParams());
+        if (StringUtils.isBlank(dto.getCatalogUri()) && 
dto.getCatalogType().equals(CATALOG_TYPE_HIVE)) {

Review Comment:
   Suggest changing `dto.getCatalogType().equals(CATALOG_TYPE_HIVE)` to 
`CATALOG_TYPE_HIVE.equals(dto.getCatalogType())`.



##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sink/iceberg/IcebergSinkOperator.java:
##########
@@ -83,6 +87,15 @@ public StreamSink getFromEntity(StreamSinkEntity entity) {
         }
 
         IcebergSinkDTO dto = IcebergSinkDTO.getFromJson(entity.getExtParams());
+        if (StringUtils.isBlank(dto.getCatalogUri()) && 
dto.getCatalogType().equals(CATALOG_TYPE_HIVE)) {

Review Comment:
   Suggest changing `dto.getCatalogType().equals(CATALOG_TYPE_HIVE)` to 
`CATALOG_TYPE_HIVE.equals(dto.getCatalogType())` to avoid NPE.



-- 
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: commits-unsubscr...@inlong.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to