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