Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-14156

SQL. Calcite: Does not return the count result if there are 0 elements in the table.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • sql
    • Docs Required, Release Notes Required

    Description

      Example:

      CREATE TABLE t1 ( id INT NOT NULL, int_col INT, PRIMARY KEY (id));
      SELECT COUNT(*) FROM t1;
      +--------------------------------+
      |             EXPR$0             |
      +--------------------------------+
      +--------------------------------+
      

      H2 return:

       SELECT COUNT(*) FROM t1;
      +--------------------------------+
      |            COUNT(*)            |
      +--------------------------------+
      | 0                              |
      +--------------------------------+
      

      if add some elements, then calcite return value:

      SELECT COUNT(*) FROM t1;
      +--------------------------------+
      |             EXPR$0             |
      +--------------------------------+
      | 5                              |
      +--------------------------------+
      

      Attachments

        Issue Links

          Activity

            People

              jooger Iurii Gerzhedovich
              prom1se Fedor Malchikov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h