Github user kavinderd commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/906#discussion_r83103736
  
    --- Diff: 
pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/HiveDataFragmenter.java
 ---
    @@ -404,24 +411,41 @@ private String buildFilterStringForHive() throws 
Exception {
             HiveFilterBuilder eval = new HiveFilterBuilder(inputData);
             Object filter = eval.getFilterObject(filterInput);
     
    -        String prefix = "";
    -
    -        if (filter instanceof List) {
    -
    -            for (Object f : (List<?>) filter) {
    -                if (buildSingleFilter(f, filtersString, prefix)) {
    -                    // Set 'and' operator between each matched partition 
filter.
    -                    prefix = " and ";
    -                }
    -            }
    -
    +        if (filter instanceof LogicalFilter) {
    +            buildCompoundFilter((LogicalFilter) filter, filtersString);
             } else {
    -            buildSingleFilter(filter, filtersString, prefix);
    +            buildSingleFilter(filter, filtersString, "");
             }
     
             return filtersString.toString();
         }
     
    +    private void buildCompoundFilter(LogicalFilter filter, StringBuilder 
filterString) throws Exception{
    +        String prefix;
    +        switch(filter.getOperator()) {
    --- End diff --
    
    Since LogicalOperation is generic, do you think we should put a very Hive 
specific string in that enum?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to