Uploaded image for project: 'Apache HAWQ'
  1. Apache HAWQ
  2. HAWQ-1617

Incorrect processing of boolean operators in pushdown

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • External Tables
    • None

    Description

      When accessing external tables, the pushdown feature sometimes works incorrect. Consider the following query:

      SELECT * FROM table_ex WHERE bool1=false AND id1=60003;

      When this query is executed, we get an error "stack is not empty ...".

      But what actually happens?

      It turns out that such query is "translated" into a list of three items that represents the constraints: 'BoolExpr', 'Var' and 'OpExpr' (this represents a constraint "WHERE NOT(bool1 = true) AND (id1 = 60003)"). Note that the list does not contain implicit AND operators.

      Then, the list is processed by a piece of code in pxffilters.c, where there is a check of presence of 'BoolExpr's. If 'BoolExpr's are detected, no implicit AND operators are added.

      In the case described, one 'BoolExpr' element is present, and no implicit AND operators are added. This leads to the error mentioned above.

      Attachments

        Activity

          People

            rlei Radar Da Lei
            leskin-in Ivan Leskin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: