zhangshenghang commented on code in PR #10222:
URL: https://github.com/apache/seatunnel/pull/10222#discussion_r2639786596


##########
seatunnel-connectors-v2/connector-maxcompute/src/main/java/org/apache/seatunnel/connectors/seatunnel/maxcompute/util/MaxcomputeOutputFormat.java:
##########
@@ -129,4 +177,34 @@ private void initializeUpsertSession() throws 
TunnelException, IOException {
                             .build();
         }
     }
+
+    private void ensureInsertSessionAndWriter() throws TunnelException {
+        if (uploadSession == null) {
+            initializeInsertSession();
+            Objects.requireNonNull(uploadSession, "UploadSession was not 
initialized properly");

Review Comment:
   What about throwing an exception with throw new?



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