Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private AbstractQueryStreamResult commonExecute(InitQueryResultCallback<Abstract
checkArgumentBeforeExec();

final long startTime = System.currentTimeMillis();
Map<Long, ObPair<Long, ObTableParam>> partitionObTables = new HashMap<Long, ObPair<Long, ObTableParam>>(); // partitionObTables -> Map<logicId, Pair<logicId, param>>
this.partitionObTables = new HashMap<Long, ObPair<Long, ObTableParam>>(); // partitionObTables -> Map<logicId, Pair<logicId, param>>

// fill a whole range if no range is added explicitly.
if (tableQuery.getKeyRanges().isEmpty()) {
Expand All @@ -168,14 +168,14 @@ private AbstractQueryStreamResult commonExecute(InitQueryResultCallback<Abstract
throw new ObTableException("key range columns must be specified when use index");
}
}
partitionObTables.put(0L, new ObPair<Long, ObTableParam>(0L, new ObTableParam(
this.partitionObTables.put(0L, new ObPair<Long, ObTableParam>(0L, new ObTableParam(
obTableClient.getOdpTable())));
} else {
initPartitions();
}

StringBuilder stringBuilder = new StringBuilder();
for (Map.Entry<Long, ObPair<Long, ObTableParam>> entry : partitionObTables.entrySet()) {
for (Map.Entry<Long, ObPair<Long, ObTableParam>> entry : this.partitionObTables.entrySet()) {
stringBuilder.append("#").append(entry.getValue().getRight().getObTable().getIp())
.append(":").append(entry.getValue().getRight().getObTable().getPort());
}
Expand All @@ -184,10 +184,10 @@ private AbstractQueryStreamResult commonExecute(InitQueryResultCallback<Abstract

// defend aggregation of multiple partitions.
if (tableQuery.isAggregation()) {
if (partitionObTables.size() > 1) {
if (this.partitionObTables.size() > 1) {
throw new ObTableException(
"Not supported aggregate of multiple partitions, the partition size is: "
+ partitionObTables.size(), ResultCodes.OB_NOT_SUPPORTED.errorCode);
+ this.partitionObTables.size(), ResultCodes.OB_NOT_SUPPORTED.errorCode);
}
}

Expand Down Expand Up @@ -250,7 +250,6 @@ public void initPartitions() throws Exception {
tableQuery.getScanRangeColumns(), false);
}

this.partitionObTables = new HashMap<Long, ObPair<Long, ObTableParam>>();
for (ObNewRange rang : this.tableQuery.getKeyRanges()) {
ObRowKey startKey = rang.getStartKey();
int startKeySize = startKey.getObjs().size();
Expand Down