[ https://issues.apache.org/jira/browse/PARQUET-532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Deepak Majeti updated PARQUET-532: ---------------------------------- Description: The scanner.h code for detecting NULLs has to be fixed and validated with test cases. The below code seems to be wrong. {code} // Returns true if there is a next value bool NextValue(T* val, bool* is_null) { .... *is_null = def_level < rep_level; if (*is_null) { return true; } .... } {code} according to the spec, a NULL value has a definition level, if any, less than the maximum definition level. If the value is NULL, false must be returned here. was: The scanner.h code for detecting NULLs has to be fixed and validated with test cases. The below code seems to be wrong. {quote} // Returns true if there is a next value bool NextValue(T* val, bool* is_null) { .... *is_null = def_level < rep_level; if (*is_null) \{ return true; \} .... } {quote} according to the spec, a NULL value has a definition level, if any, less than the maximum definition level. If the value is NULL, false must be returned here. > Null values detection needs to be fixed and tested > -------------------------------------------------- > > Key: PARQUET-532 > URL: https://issues.apache.org/jira/browse/PARQUET-532 > Project: Parquet > Issue Type: Bug > Reporter: Deepak Majeti > Assignee: Deepak Majeti > > The scanner.h code for detecting NULLs has to be fixed and validated with > test cases. > The below code seems to be wrong. > {code} > // Returns true if there is a next value > bool NextValue(T* val, bool* is_null) { > .... > *is_null = def_level < rep_level; > if (*is_null) { > return true; > } > .... > } > {code} > according to the spec, a NULL value has a definition level, if any, less than > the maximum definition level. If the value is NULL, false must be returned > here. -- This message was sent by Atlassian JIRA (v6.3.4#6332)