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 issue #594: DRILL-4842: SELECT * on JSON data results in NumberFormatE...
Date Sun, 19 Feb 2017 00:58:16 GMT
Github user paul-rogers commented on the issue:

    Note that Drill *does* have a vector that can possibly used to represent a run of nulls:
the {{ZeroVector}}. Using this, we can:
    * On the first record where we see a field, if that field is null, add a {{ZeroVector}}
to the record batch.
    * On subsequent records, if the value is still null, do nothing.
    * If the value is non-null, and the current vector is a {{ZeroVector}}, replace it with
the proper Nullable vector, with all (0..i-1) values set to null, and the ith value set to
the current column.
    * At end of batch, if any {{ZeroVector}}s remain, simply remove them so that the column
does not appear in the batch output.
    The result of this is that we need not do two map lookups for a null value, we just do
one: the one to find the column value vector as we'd do for an int or string.

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 infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message