yunqingmoswu commented on code in PR #6766:
URL: https://github.com/apache/inlong/pull/6766#discussion_r1041824703
##########
inlong-sort/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/sink/multiple/DynamicSchemaHandleOperator.java:
##########
@@ -133,6 +157,41 @@ public void processElement(StreamRecord<RowData> element)
throws Exception {
}
}
+ private void handleDirtyData(Object dirtyData, JsonNode rootNode,
DirtyType dirtyType, Exception e) {
+ if (!dirtyOptions.ignoreDirty()) {
+ RuntimeException ex;
+ if (e instanceof RuntimeException) {
+ ex = (RuntimeException) e;
+ } else {
+ ex = new RuntimeException(e);
+ }
+ throw ex;
+ }
+ if (dirtySink != null) {
+ DirtyData.Builder<Object> builder = DirtyData.builder();
+ try {
+ builder.setData(dirtyData)
+ .setDirtyType(dirtyType)
+ .setDirtyMessage(e.getMessage());
+ if (rootNode != null) {
Review Comment:
It is enough here, it just records the approximate cause of dirty data, and
the specific error stack has been printed in the log.
--
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]