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

    https://github.com/apache/incubator-hawq/pull/906#discussion_r83099497
  
    --- Diff: 
pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/FilterParser.java ---
    @@ -396,4 +387,12 @@ private Operation reverseOp(Operation operation) {
             operatorTranslationMap.put(8, Operation.HDOP_LIKE);
             return operatorTranslationMap;
         }
    +
    +    static private Map<Integer, LogicalOperation> 
initLogicalOperatorTransMap() {
    +        Map<Integer, LogicalOperation> integerLogicalOperationMap = new 
HashMap<>();
    --- End diff --
    
    please review 
http://stackoverflow.com/questions/5292790/convert-integer-value-to-matching-java-enum
 for discussion on dangers of relying on ordinal values. I think for us, we 
might want to maintain explicit number as the private member of enum, then 
build and cache the array once for all future access.


---
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