Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Following plan outputs empty values for nullableStr1 column after 1st row.
{ head:{ type:"APACHE_DRILL_PHYSICAL", version:"1", generator:{ type:"manual" } }, graph:[ { @id:1, pop:"mock-sub-scan", url: "http://apache.org", entries:[ {records: 100, types: [ {name: "nullableStr1", type: "VARCHAR", mode: "OPTIONAL"} ]} ] }, { @id:2, child: 1, pop:"project", exprs: [ { ref: "nullableStr1", expr: "nullableStr1" } ] }, { @id: 3, child: 2, pop: "screen" } ] }
After transferring the ValueVector from 'scan' to 'project', ProjectRecordBatch calls NullableVarCharVector.setValueCount. As part of this method, all records from "lastSet +1" to "count" are set to empty byte array, because 'lastSet' is not set as part of the mock-sub-scan (default to 0), all but the first record have empty string data.
public void setValueCount(int valueCount) { ..... for (int i = lastSet + 1; i < valueCount; i++) { values.getMutator().set(i, new byte[]{}); } .... }
Attachments
Attachments
Issue Links
- is related to
-
DRILL-417 Nullable Var Length vector offsetVector not populated correctly
- Resolved