[GitHub] incubator-hawq issue #1344: HAWQ-1599. PXF Ignite plugin

2018-05-25 Thread denalex
Github user denalex commented on the issue:

https://github.com/apache/incubator-hawq/pull/1344
  
@kapustor -- we are ready to commit it if you do not plan any further 
changes. Need to put it through a regression run on our side, hope to be done 
with it next week. Thanks.


---


[GitHub] incubator-hawq pull request #1369: HAWQ-1617. Incorrect processing of boolea...

2018-05-25 Thread leskin-in
GitHub user leskin-in opened a pull request:

https://github.com/apache/incubator-hawq/pull/1369

HAWQ-1617. Incorrect processing of boolean operators in pushdown

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, an error "stack is not empty ..." happens.

Turns out that such query is transformed into a list of three items that 
represents the constraints: `BoolExpr`, `Var` and `OpExpr` (this is equal to a 
query `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](https://github.com/apache/incubator-hawq/blob/master/src/backend/access/external/pxffilters.c#L1259),
 where there is a check of presence of `BoolExpr`. If expression items of this 
kind 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 commit changes the signatures of `enrich_trivial_expression()` and 
`pxf_free_expression_items_list()` from 
[pxffilters.c](https://github.com/apache/incubator-hawq/blob/master/src/backend/access/external/pxffilters.c)
 in order to fix the bug:
* A number of impicit AND operators to be added is now passed to 
`add_extra_and_expression_items()`
* `add_extra_and_expression_items()` now requires the pointer to pointer to 
`Node` object to store the pointer to an expression item for the implicit AND 
that it creates (before, it was stored in the expression item itself; however, 
due to the presence of other logical operators, we cannot rely on this 
mechanism)
* `pxf_free_expression_items_list()` simplifies, due to the changes in the 
way how the pointer to `Node` object is stored

The current mechanism of implicit AND expressions addition works well only 
while the
OR operators are not supported (or not present in a query). When the OR 
operators appear, the implicit ANDs must be added in different parts of a 
query, not only to the end, as done now.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/arenadata/incubator-hawq HAWQ-1617

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-hawq/pull/1369.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1369






---


[GitHub] incubator-hawq issue #1344: HAWQ-1599. PXF Ignite plugin

2018-05-25 Thread kapustor
Github user kapustor commented on the issue:

https://github.com/apache/incubator-hawq/pull/1344
  
Hi guys,

Any news on this PR?


---


[GitHub] incubator-hawq issue #1353: HAWQ-1605. Support INSERT in PXF JDBC plugin

2018-05-25 Thread kapustor
Github user kapustor commented on the issue:

https://github.com/apache/incubator-hawq/pull/1353
  
Hi @sansanichfb,

Any news on this PR?


---


[jira] [Updated] (HAWQ-1617) Incorrect processing of boolean operators in pushdown

2018-05-25 Thread Ivan Leskin (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ivan Leskin updated HAWQ-1617:
--
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|https://github.com/apache/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.

  was:
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|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.


> 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
>Priority: Major
>
> 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|https://github.com/apache/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)


[jira] [Updated] (HAWQ-1617) Incorrect processing of boolean operators in pushdown

2018-05-25 Thread Ivan Leskin (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ivan Leskin updated HAWQ-1617:
--
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|[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.

  was:
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, 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.


> 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
>Priority: Major
>
> 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|[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)


[jira] [Updated] (HAWQ-1617) Incorrect processing of boolean operators in pushdown

2018-05-25 Thread Ivan Leskin (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ivan Leskin updated HAWQ-1617:
--
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, 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.

  was:
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.


> 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
>Priority: Major
>
> 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, 
> 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)


[jira] [Created] (HAWQ-1617) Incorrect processing of boolean operators in pushdown

2018-05-25 Thread Ivan Leskin (JIRA)
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)


[GitHub] incubator-hawq pull request #1364: HAWQ-1612. Implement vectorized aggregate...

2018-05-25 Thread zhangjackey
Github user zhangjackey closed the pull request at:

https://github.com/apache/incubator-hawq/pull/1364


---