drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chunhui-shi <...@git.apache.org>
Subject [GitHub] drill pull request #594: DRILL-4842: SELECT * on JSON data results in Number...
Date Mon, 03 Oct 2016 20:06:28 GMT
Github user chunhui-shi commented on a diff in the pull request:

    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/fn/JsonReader.java
    @@ -131,14 +139,33 @@ public void ensureAtLeastOneField(ComplexWriter writer) {
           PathSegment fieldPath = fieldPathList.get(j);
           if (emptyStatus.get(j)) {
             if (allTextMode) {
    -          fieldWriter.varChar(fieldPath.getNameSegment().getPath());
    +          if (checkNullFields(fieldPathList)) {
    --- End diff --
    This is in the loop of going through fieldPathList, if there are two fields in emptyStatus,
will it result in calling checkNullFields twice and then fieldWriter.varChar(fieldName) twice
for the same field?
    To make sure here we are doing the right thing, I think testing more on hierarchical json
could be helpful, what is your opinion? Like this example:
    {"c0":{"c11": "I am not NULL", "c1": null}, "c1": "I am not NULL", "c11":null}.

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