Skip to content

Commit c13ecdf

Browse files
committed
review comments
1 parent 1b8611a commit c13ecdf

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/main/java/com/alipay/oceanbase/rpc/ObGlobal.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ public static boolean isReturnOneResultSupport() {
9292
}
9393

9494
public static boolean isHBaseBatchGetSupport() {
95-
return (OB_VERSION >= OB_VERSION_4_2_5_2 && OB_VERSION < OB_VERSION_4_3_0_0)
96-
|| OB_VERSION >= OB_VERSION_4_3_5_0;
95+
return OB_VERSION >= OB_VERSION_4_2_5_2 && OB_VERSION < OB_VERSION_4_3_0_0;
9796
}
9897

9998
public static boolean isCellTTLSupport() {

src/main/java/com/alipay/oceanbase/rpc/mutation/BatchOperation.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,8 @@ public BatchOperation setTable(String tableName) {
9090
*/
9191
public BatchOperation addOperation(TableQuery... queries) {
9292
boolean isHBaseQuery = false;
93-
for (TableQuery query : queries) {
94-
if (query.getObTableQuery().isHbaseQuery()) {
95-
isHBaseQuery = true;
96-
}
97-
break;
93+
if (queries != null && queries.length > 0) {
94+
isHBaseQuery = queries[0].getObTableQuery().isHbaseQuery();
9895
}
9996
if (isHBaseQuery) {
10097
if (isSameType && lastType != ObTableOperationType.INVALID
@@ -118,7 +115,7 @@ public BatchOperation addOperation(TableQuery... queries) {
118115
*/
119116
public BatchOperation addOperation(Get... gets) {
120117
if (isSameType && lastType != ObTableOperationType.INVALID
121-
&& lastType != ObTableOperationType.GET) {
118+
&& lastType != ObTableOperationType.GET) {
122119
isSameType = false;
123120
}
124121

0 commit comments

Comments
 (0)