Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/906#discussion_r135710183
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScanBatch.java 
---
    @@ -329,9 +326,11 @@ public TypedFieldId getValueVectorId(SchemaPath path) {
     
       @VisibleForTesting
       public static class Mutator implements OutputMutator {
    -    /** Whether schema has changed since last inquiry (via #isNewSchema}). 
 Is
    -     *  true before first inquiry. */
    -    private boolean schemaChanged = true;
    +    /** Flag keeping track whether top-level schema has changed since last 
inquiry (via #isNewSchema}).
    +     * It's initialized to false, or reset to false after #isNewSchema or 
after #clear, until a new value vector
    +     * or a value vector with different type is added to fieldVectorMap.
    +     **/
    +    private boolean schemaChanged;
    --- End diff --
    
    No comments with respect to "flag vs counter". But the flag is in the 
existing code, and the patch I have simply 1) change the initial value of flag, 
2) add comments. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to