Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-2425

Wrong results when identifier change cases within the same data file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • 0.8.0
    • 1.0.0
    • Execution - Data Types
    • None

    Description

      #Fri Mar 06 16:51:10 EST 2015
      git.commit.id.abbrev=fb293ba

      I have the following JSON file that one of the identifier change cases:

      [root@qa-node120 md-83]# hadoop fs -cat /drill/testdata/complex_type/json/schema/a.json
      {"SOURCE": "ebm","msAddressIpv6Array": null}
      {"SOURCE": "ebm","msAddressIpv6Array": {"msAddressIpv6_1":"99.111.222.0", "msAddressIpv6_2":"88.222.333.0"}}
      {"SOURCE": "ebm","msAddressIpv6Array": {"msAddressIpv6_1":"99.111.222.1", "msAddressIpv6_2":"88.222.333.1"}}
      {"SOURCE": "ebm","msAddressIpv6Array": {"msaddressipv6_1":"99.111.222.2", "msAddressIpv6_2":"88.222.333.2"}}
      

      Query this file through drill gives wrong results:

      0: jdbc:drill:schema=dfs.drillTestDirComplexJ> select t.msAddressIpv6Array.msAddressIpv6_1 as msAddressIpv6_1 from `schema/a.json` t;
      +-----------------+
      | msAddressIpv6_1 |
      +-----------------+
      | null            |
      | null            |
      | null            |
      | 99.111.222.2    |
      +-----------------+
      

      plan:

      0: jdbc:drill:schema=dfs.drillTestDirComplexJ> explain plan for select t.msAddressIpv6Array.msAddressIpv6_1 as msAddressIpv6_1 from `schema/a.json` t;
      +------------+------------+
      |    text    |    json    |
      +------------+------------+
      | 00-00    Screen
      00-01      Project(msAddressIpv6_1=[ITEM($0, 'msAddressIpv6_1')])
      00-02        Scan(groupscan=[EasyGroupScan [selectionRoot=/drill/testdata/complex_type/json/schema/a.json, numFiles=1, columns=[`msAddressIpv6Array`.`msAddressIpv6_1`], files=[maprfs:/drill/testdata/complex_type/json/schema/a.json]]])
      

      Attachments

        Issue Links

          Activity

            People

              cchang@maprtech.com Chun Chang
              cchang@maprtech.com Chun Chang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: