You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hawq.apache.org by sansanichfb <gi...@git.apache.org> on 2016/11/22 19:55:02 UTC

[GitHub] incubator-hawq pull request #1021: Hawq 1115

GitHub user sansanichfb opened a pull request:

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

    Hawq 1115

    

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

    $ git pull https://github.com/sansanichfb/incubator-hawq HAWQ-1115

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

    https://github.com/apache/incubator-hawq/pull/1021.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 #1021
    
----
commit c36167b24187f37426fdaa1d070abf9d45009461
Author: Oleksandr Diachenko <od...@pivotal.io>
Date:   2016-11-17T00:59:27Z

    HAWQ-1115. Draft implementation.

commit 1802c32d8e3c2c81092148296956322d97523e2f
Author: Oleksandr Diachenko <od...@pivotal.io>
Date:   2016-11-17T22:56:02Z

    HAWQ-1115. Implemented builder part.

commit 5cc09458cf16cf67ac3298b074fa9561bb068f9a
Author: Oleksandr Diachenko <od...@pivotal.io>
Date:   2016-11-22T19:53:07Z

    HAWQ-1115. Added unit-tests.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request #1021: HAWQ-1115. Implement filter-push down for...

Posted by denalex <gi...@git.apache.org>.
Github user denalex commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1021#discussion_r89202947
  
    --- Diff: pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/FilterParser.java ---
    @@ -418,6 +430,40 @@ private Object parseParameter() throws Exception {
             return data;
         }
     
    +    private Object parseListParameter() throws Exception {
    +        if (index == filterByteArr.length) {
    +            throw new FilterStringSyntaxException("argument should follow at " + index);
    +        }
    +
    +        DataType dataType = DataType.get(parseConstDataType());
    +        List<Object> data = new ArrayList<Object>();;
    --- End diff --
    
    one extra ;


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request #1021: HAWQ-1115. Implement filter-push down for...

Posted by shivzone <gi...@git.apache.org>.
Github user shivzone commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1021#discussion_r89234431
  
    --- Diff: pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/FilterParser.java ---
    @@ -418,6 +430,40 @@ private Object parseParameter() throws Exception {
             return data;
         }
     
    +    private Object parseListParameter() throws Exception {
    +        if (index == filterByteArr.length) {
    +            throw new FilterStringSyntaxException("argument should follow at " + index);
    +        }
    +
    +        DataType dataType = DataType.get(parseConstDataType());
    +        List<Object> data = new ArrayList<Object>();
    +        if (dataType == DataType.UNSUPPORTED_TYPE) {
    +            throw new FilterStringSyntaxException("invalid DataType OID at " + (index - 1));
    +        }
    +
    +        if (dataType.getTypeElem() == null) {
    +            throw new FilterStringSyntaxException("expected non-scalar datatype, but got datatype with oid = " + dataType.getOID());
    +        }
    +
    +        while (((char) filterByteArr[index]) == CONST_LEN) {
    +            int dataLength = parseDataLength();
    --- End diff --
    
    What happens in query scenarios with column in [''] or column in []


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request #1021: HAWQ-1115. Implement filter-push down for...

Posted by sansanichfb <gi...@git.apache.org>.
Github user sansanichfb commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1021#discussion_r89413173
  
    --- Diff: pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/FilterParser.java ---
    @@ -418,6 +430,40 @@ private Object parseParameter() throws Exception {
             return data;
         }
     
    +    private Object parseListParameter() throws Exception {
    +        if (index == filterByteArr.length) {
    +            throw new FilterStringSyntaxException("argument should follow at " + index);
    +        }
    +
    +        DataType dataType = DataType.get(parseConstDataType());
    +        List<Object> data = new ArrayList<Object>();
    +        if (dataType == DataType.UNSUPPORTED_TYPE) {
    +            throw new FilterStringSyntaxException("invalid DataType OID at " + (index - 1));
    +        }
    +
    +        if (dataType.getTypeElem() == null) {
    +            throw new FilterStringSyntaxException("expected non-scalar datatype, but got datatype with oid = " + dataType.getOID());
    +        }
    +
    +        while (((char) filterByteArr[index]) == CONST_LEN) {
    --- End diff --
    
    It's already taken care: if (index == filterByteArr.length) {


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request #1021: HAWQ-1115. Implement filter-push down for...

Posted by sansanichfb <gi...@git.apache.org>.
Github user sansanichfb commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1021#discussion_r89412987
  
    --- Diff: pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/FilterParser.java ---
    @@ -418,6 +430,40 @@ private Object parseParameter() throws Exception {
             return data;
         }
     
    +    private Object parseListParameter() throws Exception {
    +        if (index == filterByteArr.length) {
    +            throw new FilterStringSyntaxException("argument should follow at " + index);
    +        }
    +
    +        DataType dataType = DataType.get(parseConstDataType());
    +        List<Object> data = new ArrayList<Object>();
    +        if (dataType == DataType.UNSUPPORTED_TYPE) {
    +            throw new FilterStringSyntaxException("invalid DataType OID at " + (index - 1));
    +        }
    +
    +        if (dataType.getTypeElem() == null) {
    +            throw new FilterStringSyntaxException("expected non-scalar datatype, but got datatype with oid = " + dataType.getOID());
    +        }
    +
    +        while (((char) filterByteArr[index]) == CONST_LEN) {
    +            int dataLength = parseDataLength();
    --- End diff --
    
    It goes through 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request #1021: HAWQ-1115. Implement filter-push down for...

Posted by sansanichfb <gi...@git.apache.org>.
Github user sansanichfb commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1021#discussion_r89212919
  
    --- Diff: pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/FilterParser.java ---
    @@ -418,6 +430,40 @@ private Object parseParameter() throws Exception {
             return data;
         }
     
    +    private Object parseListParameter() throws Exception {
    +        if (index == filterByteArr.length) {
    +            throw new FilterStringSyntaxException("argument should follow at " + index);
    +        }
    +
    +        DataType dataType = DataType.get(parseConstDataType());
    +        List<Object> data = new ArrayList<Object>();;
    --- End diff --
    
    thanks, fixed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request #1021: HAWQ-1115. Implement filter-push down for...

Posted by sansanichfb <gi...@git.apache.org>.
Github user sansanichfb closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request #1021: HAWQ-1115. Implement filter-push down for...

Posted by shivzone <gi...@git.apache.org>.
Github user shivzone commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1021#discussion_r89241372
  
    --- Diff: pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/HiveORCAccessor.java ---
    @@ -195,6 +195,15 @@ private boolean buildArgument(SearchArgument.Builder builder, Object filterObj)
                 case HDOP_IS_NOT_NULL:
                     builder.startNot().isNull(filterColumnName).end();
                     break;
    +            case HDOP_IN:
    +                if (filterValue instanceof List) {
    +                    @SuppressWarnings("unchecked")
    --- End diff --
    
    OK


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq issue #1021: HAWQ-1115. Implement filter-push down for IN on ...

Posted by kavinderd <gi...@git.apache.org>.
Github user kavinderd commented on the issue:

    https://github.com/apache/incubator-hawq/pull/1021
  
    Nice work


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---