Yingchun Lai has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/19949 )

Change subject: [KUDU-3483] Fixbug of auto flush data when table schema changed
......................................................................


Patch Set 12: Code-Review+1

(1 comment)

http://gerrit.cloudera.org:8080/#/c/19949/12/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduSession.java
File 
java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduSession.java:

http://gerrit.cloudera.org:8080/#/c/19949/12/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduSession.java@426
PS12, Line 426: if (!isFind) {
How about refactor as:

 List<Batch> batchList = batches.get(tabletId);
 // Create a new batch list if found operations on a new tablet...
 if (batchList == null) {
   ...
   continue;
 }

 Batch last_batch = batchList.get(batchList.size() - 1);
 // Put the operation to the batch if they have the same schema...
 if 
(last_batch.operations.get(0).table.getSchema().equals(operation.table.getSchema()))
 {
   ...
   continue;
 }

 // Create a new batch if schema changed...
 Batch batch = new Batch(...);
 ...



--
To view, visit http://gerrit.cloudera.org:8080/19949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie6501962b32814d121f180b2942999c402d927db
Gerrit-Change-Number: 19949
Gerrit-PatchSet: 12
Gerrit-Owner: Wang Xixu <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: KeDeng <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Wang Xixu <[email protected]>
Gerrit-Reviewer: Yifan Zhang <[email protected]>
Gerrit-Reviewer: Yingchun Lai <[email protected]>
Gerrit-Reviewer: Yuqi Du <[email protected]>
Gerrit-Comment-Date: Mon, 19 Jun 2023 03:12:12 +0000
Gerrit-HasComments: Yes

Reply via email to