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

    https://github.com/apache/phoenix/pull/355#discussion_r226149926
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/expression/ComparisonExpression.java
 ---
    @@ -327,6 +328,9 @@ public boolean evaluate(Tuple tuple, 
ImmutableBytesWritable ptr) {
                 rhsLength = StringUtil.getUnpaddedCharLength(rhsBytes, 
rhsOffset, rhsLength, rhsSortOrder);
             }
             if (lhsDataType == PChar.INSTANCE) {
    +            // Due to length of PChar columns may be modified, in order to 
the values of filters can match original data,
    +            // we make rhsLength equal with lhsLength.
    --- End diff --
    
    I’m a bit scared of this approach.  There are several comparison like 
behavior and other row construction in expressions like Like, InList, RVCs, 
Case that may be impacted as well. 


---

Reply via email to