зеркало из https://github.com/Azure/YCSB.git
[orientdb] fixed scan with readallfields
This commit is contained in:
Родитель
c4d0074248
Коммит
7af9ff19e8
|
@ -280,20 +280,20 @@ public class OrientDBClient extends DB {
|
||||||
int entrycount = 0;
|
int entrycount = 0;
|
||||||
final OIndexCursor entries = dictionary.getIndex().iterateEntriesMajor(startkey, true, true);
|
final OIndexCursor entries = dictionary.getIndex().iterateEntriesMajor(startkey, true, true);
|
||||||
|
|
||||||
if (fields != null && !fields.isEmpty()) {
|
while (entries.hasNext() && entrycount < recordcount) {
|
||||||
while (entries.hasNext() && entrycount < recordcount) {
|
final OIdentifiable entry = entries.next();
|
||||||
final OIdentifiable entry = entries.next();
|
final ODocument document = entry.getRecord();
|
||||||
final ODocument document = entry.getRecord();
|
|
||||||
|
|
||||||
final HashMap<String, ByteIterator> map = new HashMap<String, ByteIterator>();
|
final HashMap<String, ByteIterator> map = new HashMap<String, ByteIterator>();
|
||||||
result.add(map);
|
result.add(map);
|
||||||
|
|
||||||
|
if (fields != null && !fields.isEmpty()) {
|
||||||
for (String field : fields) {
|
for (String field : fields) {
|
||||||
map.put(field, new StringByteIterator((String) document.field(field)));
|
map.put(field, new StringByteIterator((String) document.field(field)));
|
||||||
}
|
}
|
||||||
|
|
||||||
entrycount++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
entrycount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status.OK;
|
return Status.OK;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче