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

Wrong result for COUNT function and empty file (schemaless table)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.13.0
    • Future
    • Functions - Drill
    • None

    Description

      The count function shouldn't return null result. For the 0 rows case it should always return 0.

      0: jdbc:drill:zk=local> select count(`last_name`) from dfs.`/tmp/empty_file.json`;
      +---------+
      | EXPR$0  |
      +---------+
      +---------+
      No rows selected (0.3 seconds)
      

      The result should be the similar to:

      0: jdbc:drill:zk=local> select count(`non_existent_column`) from cp.`employee.json`;
      +---------+
      | EXPR$0  |
      +---------+
      | 0       |
      +---------+
      1 row selected (0.274 seconds)
      

      Note: empty_file.json is an empty file.

      Attachments

        Activity

          People

            hanu.ncr Hanumath Rao Maduri
            vitalii Vitalii Diravka
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: