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

JSON Column names such as first ,last not returning data- NULL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.4.0
    • None
    • None

    Description

      Assume the json file has columns/fields like

      0: jdbc:drill:schema=dfs> select * from dfs.`/user/root/employeeNestedObject.json`;
      ---------------------------------------------------------------------------------------------------------------------+

      first last age sex salary wealth registered favorites.color favorites.number favorites.food

      ---------------------------------------------------------------------------------------------------------------------+

      John Doe 39 M 2147483647 1.7976931E30 true Blue 13 Spaghetti

      ---------------------------------------------------------------------------------------------------------------------+

      Querying the 'first' column name returns null. Seems to be a reserved word/ function

      0: jdbc:drill:schema=dfs> select first from dfs.`/user/root/employeeNestedObject.json`;
      ------------

      FIRST

      ------------

      null

      However if the name is changed to firstName it works fine
      0: jdbc:drill:schema=dfs> select firstName from dfs.`/user/root/employeeNestedObject.json`;
      ------------

      firstName

      ------------

      John

      ------------
      1 row selected (0.082 seconds)

      Same for last.

      Attachments

        Activity

          People

            Unassigned Unassigned
            inramana Ramana Inukonda Nagaraj
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: