Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-3787

CS doesn't apply having with impossible condition on top of aggregation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.4.2
    • Fix Version/s: None
    • Component/s: ExeMgr
    • Labels:
      None

      Description

      Consider example.

      MariaDB [test]> select sum(i) from cs1 HAVING -1 != -1;
      +--------+
      | sum(i) |
      +--------+
      |   NULL |
      +--------+
      1 row in set, 1 warning (0.012 sec)
       
      MariaDB [test]> select calgettrace(0)\G
      *************************** 1. row ***************************
      calgettrace(0): 
      Desc Mode Table TableOID ReferencedColumns PIO LIO PBE Elapsed Rows 
      TCS  UM   -     -        -                 -   -   -   0.000   0    
      TAS  UM   -     -        -                 -   -   -   0.000   1    
      TNS  UM   -     -        -                 -   -   -   0.000   1    
       
      1 row in set (0.000 sec)
       
      MariaDB [test]> 
      

      Innodb table returns an empty set for the same query meanwhile. CS doesn't have having in TNS when HAVING has impossible conditions.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              drrtuy Roman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: