Skip to content

Commit 4939c4d

Browse files
committed
add get_optimized flag for obtablequery
1 parent 9466ae7 commit 4939c4d

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/main/java/com/alipay/oceanbase/rpc/protocol/payload/impl/execute/query/ObTableQuery.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,4 +618,8 @@ public void setFlag(ObTableQueryFlag flag) {
618618
public void setHotOnly(boolean hotOnly) {
619619
this.flag.setHotOnly(hotOnly);
620620
}
621+
622+
public void setGetOptimized(boolean getOptimized) {
623+
this.flag.setGetOptimized(getOptimized);
624+
}
621625
}

src/main/java/com/alipay/oceanbase/rpc/protocol/payload/impl/execute/query/ObTableQueryFlag.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
public class ObTableQueryFlag {
2121
private static final int HOT_ONLY = 1 << 0;
22+
private static final int GET_OPTIMIZED = 1 << 1;
2223

2324
private long value = 0;
2425

@@ -43,4 +44,14 @@ public void setHotOnly(boolean hotOnly) {
4344
value = value | HOT_ONLY;
4445
}
4546
}
47+
48+
public boolean isGetOptimized() {
49+
return (value & GET_OPTIMIZED) != 0;
50+
}
51+
52+
public void setGetOptimized(boolean getOptimized) {
53+
if (getOptimized) {
54+
value = value | GET_OPTIMIZED;
55+
}
56+
}
4657
};

0 commit comments

Comments
 (0)