You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hawq.apache.org by "Ivan Leskin (JIRA)" <ji...@apache.org> on 2018/05/25 13:11:01 UTC
[jira] [Created] (HAWQ-1617) Incorrect processing of boolean
operators in pushdown
Ivan Leskin created HAWQ-1617:
---------------------------------
Summary: Incorrect processing of boolean operators in pushdown
Key: HAWQ-1617
URL: https://issues.apache.org/jira/browse/HAWQ-1617
Project: Apache HAWQ
Issue Type: Bug
Components: External Tables
Reporter: Ivan Leskin
Assignee: Radar Lei
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 ...".
What happens behind the curtains?
It turns out that such query is "translated" into a list of three items, which 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|[https://github.com/arenadata/incubator-hawq/blob/master/src/backend/access/external/pxffilters.c#L1259].] 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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)