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

Add support for nullable maps

    XMLWordPrintableJSON

Details

    Description

      git.commit.id.abbrev=108d29f

      Dataset :

      {
       "id":1,
       "keys":{"m1":{"v7":{"k1":"k2"}},"m2":{"v1":"abc","v2":{"w1":0.24}}}
      }
      {
       "id":1,
       "keys":{"m1":{"v7":{"k1":"k3"}},"m2":{"v1":"abc","v2":{"w1":0.2}}}
      }
      

      Query :

      select kvgen(keys) from `json_kvgenflatten/temp.json`;
      +------------+
      |   EXPR$0   |
      +------------+
      | [{"key":"m1","value":{"v7":{"k1":"k2"},"v2":{}}},{"key":"m2","value":{"v7":{},"v1":"abc","v2":{"w1":0.24}}}] |
      | [{"key":"m1","value":{"v7":{"k1":"k3"},"v2":{}}},{"key":"m2","value":{"v7":{},"v1":"abc","v2":{"w1":0.2}}}] |
      +------------+
      2 rows selected (0.508 seconds)
      

      In the above output , drill seems to be ignoring the empty scalars (v1) but not empty maps (v2)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rkins Rahul Kumar Challapalli
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: