Skip to content

Commit e32d1d4

Browse files
committed
time range
1 parent fb65975 commit e32d1d4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/com/alipay/oceanbase/hbase/OHTable.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import com.alipay.oceanbase.rpc.stream.ObTableClientQueryAsyncStreamResult;
3939
import com.alipay.oceanbase.rpc.table.ObHBaseParams;
4040
import com.alipay.oceanbase.rpc.table.ObKVParams;
41+
import com.alipay.oceanbase.rpc.util.ObBytesString;
4142
import com.alipay.sofa.common.thread.SofaThreadPoolExecutor;
4243

4344
import com.google.protobuf.Descriptors;
@@ -994,6 +995,9 @@ private ObKVParams buildOBKVParams(final Scan scan) {
994995
obHBaseParams.setCallTimeout(scannerTimeout);
995996
obHBaseParams.setCacheBlock(scan.isGetScan());
996997
obHBaseParams.setAllowPartialResults(scan.getAllowPartialResults());
998+
for (Map.Entry<byte[], TimeRange> entry: scan.getColumnFamilyTimeRange().entrySet()) {
999+
obHBaseParams.addFamilyTimeRange(new ObBytesString(entry.getKey()), entry.getValue().getMin(), entry.getValue().getMax());
1000+
}
9971001
}
9981002
obKVParams.setObParamsBase(obHBaseParams);
9991003
return obKVParams;
@@ -1004,6 +1008,9 @@ private ObKVParams buildOBKVParams(final Get get) {
10041008
ObHBaseParams obHBaseParams = new ObHBaseParams();
10051009
obHBaseParams.setCheckExistenceOnly(get.isCheckExistenceOnly());
10061010
obHBaseParams.setCacheBlock(get.getCacheBlocks());
1011+
for (Map.Entry<byte[], TimeRange> entry: get.getColumnFamilyTimeRange().entrySet()) {
1012+
obHBaseParams.addFamilyTimeRange(new ObBytesString(entry.getKey()), entry.getValue().getMin(), entry.getValue().getMax());
1013+
}
10071014
obKVParams.setObParamsBase(obHBaseParams);
10081015
return obKVParams;
10091016
}

0 commit comments

Comments
 (0)