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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.13.0
    • Fix Version/s: Future
    • Component/s: Functions - Drill
    • Labels:
      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

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

              Dates

              • Created:
                Updated: