Skip to content
Browse files
DRILL-5495: convert_from function on top of int96 data results in Arr…
  • Loading branch information
vdiravka authored and arina-ielchiieva committed Jul 13, 2018
1 parent c39ba74 commit feb99ac1a73522ce9f5dd5e3b001a89722130dbc
Showing 1 changed file with 3 additions and 4 deletions.
@@ -81,17 +81,16 @@ protected void readField(long recordsToReadInThisPass) {
if (usingDictionary) {
NullableVarBinaryVector.Mutator mutator = valueVec.getMutator();
Binary currDictValToWrite;
for (int i = 0; i < recordsReadInThisIteration; i++){
for (int i = 0; i < recordsToReadInThisPass; i++) {
currDictValToWrite = pageReader.dictionaryValueReader.readBytes();
ByteBuffer buf = currDictValToWrite.toByteBuffer();
mutator.setSafe(valuesReadInCurrentPass + i, buf, buf.position(),
mutator.setSafe(valuesReadInCurrentPass + i, buf, buf.position(), currDictValToWrite.length());
// Set the write Index. The next page that gets read might be a page that does not use dictionary encoding
// and we will go into the else condition below. The readField method of the parent class requires the
// writer index to be set correctly.
int writerIndex = castedBaseVector.getBuffer().writerIndex();
castedBaseVector.getBuffer().setIndex(0, writerIndex + (int)readLength);
castedBaseVector.getBuffer().setIndex(0, writerIndex + (int) readLength);
} else {
// TODO - replace this with fixed binary type in drill

0 comments on commit feb99ac

Please sign in to comment.