Copilot commented on code in PR #10060:
URL: https://github.com/apache/seatunnel/pull/10060#discussion_r2591355795
##########
seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/writer/DorisSinkWriter.java:
##########
@@ -255,14 +255,20 @@ private void checkLoadException() {
@Override
public void close() throws IOException {
- if (!dorisSinkConfig.getEnable2PC()) {
- flush();
- }
- if (scheduledExecutorService != null) {
- scheduledExecutorService.shutdownNow();
- }
- if (dorisStreamLoad != null) {
- dorisStreamLoad.close();
+ try {
+ if (!dorisSinkConfig.getEnable2PC()) {
+ flush();
+ }
+ } catch (Exception e) {
+ log.error("Flush data failed when close doris writer.", e);
Review Comment:
Grammar error in log message. Should be "when closing" instead of "when
close".
```suggestion
log.error("Flush data failed when closing doris writer.", e);
```
##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-doris-e2e/src/test/java/org/apache/seatunnel/e2e/connector/doris/DorisIT.java:
##########
@@ -477,6 +499,52 @@ private String createUniqueTableForTest(String db) {
return String.format(createTableSql, db, UNIQUE_TABLE);
}
+ private String createTypeCastErrorSinkTableForTest(String db) {
+ // The type of column MAP_VARCHAR_STRING in sink table bitmap, source
table is varchar type.
Review Comment:
The comment incorrectly states "source table is varchar type". The source
table's MAP_VARCHAR_STRING column is of type `MAP<VARCHAR(255), STRING>`, not
varchar. Consider correcting the comment to: "The type of column
MAP_VARCHAR_STRING in sink table is bitmap, while source table has
MAP<VARCHAR(255), STRING> type."
```suggestion
// The type of column MAP_VARCHAR_STRING in sink table is bitmap,
while source table has MAP<VARCHAR(255), STRING> type.
```
--
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]