healchow commented on code in PR #4515:
URL: https://github.com/apache/incubator-inlong/pull/4515#discussion_r889938555


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sink/iceberg/IcebergSinkOperation.java:
##########
@@ -133,6 +136,26 @@ public void saveFieldOpt(SinkRequest request) {
         LOGGER.info("success to save iceberg field");
     }
 
+    private void checkFieldInfo(SinkField field) {
+        if (FieldType.forName(field.getFieldType()) == FieldType.DECIMAL) {
+            IcebergColumnInfo info = 
IcebergColumnInfo.getFromJson(field.getExtParams());
+            if (info.getPrecision() == null || info.getScale() == null) {
+                String errorMsg = String.format("precision or scale not 
specified for decimal field (%s)",
+                        field.getFieldName());
+                LOGGER.error("field info check error: {}", errorMsg);
+                throw new IllegalArgumentException(errorMsg);

Review Comment:
   Please change the exception to `BusinessException` which it can be 
recognized by the front end.



-- 
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]

Reply via email to