drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul-rogers <...@git.apache.org>
Subject [GitHub] drill pull request #939: DRILL-5550: Missing CSV column value set to null
Date Wed, 13 Sep 2017 17:33:53 GMT
Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/939#discussion_r138687170
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/text/compliant/FieldVarCharOutput.java
---
    @@ -211,10 +210,10 @@ public void finishRecord() {
           endField();
         }
     
    -    // Fill in null (really empty) values.
    +    // Fill in null values
     
         for (int i = 0; i < nullCols.length; i++) {
    -      vectors[nullCols[i]].getMutator().setSafe(recordCount, nullValue, 0, 0);
    +      vectors[nullCols[i]].getMutator().setNull(recordCount);
    --- End diff --
    
    Here we are combining null columns and data columns into a single array. Perhaps we should
have an array of projected columns (non-null), and a separate array of null columns (optional
varChar).
    
    Note that "memory fragmentation" project has fixed this in the general case. In that solution,
the solution is similar to that described above: projected columns are required, missing columns
are nullable.


---

Mime
View raw message