You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@parquet.apache.org by "Deepak Majeti (JIRA)" <ji...@apache.org> on 2016/02/14 23:31:18 UTC

[jira] [Updated] (PARQUET-532) Null values detection needs to be fixed and tested

     [ 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)