ChinmaySKulkarni commented on a change in pull request #629: PHOENIX-5559 Fix 
remaining issues with Long viewIndexIds.
URL: https://github.com/apache/phoenix/pull/629#discussion_r345534064
 
 

 ##########
 File path: 
phoenix-core/src/main/java/org/apache/phoenix/iterate/ExplainTable.java
 ##########
 @@ -215,7 +215,7 @@ private void appendPKColumnValue(StringBuilder buf, byte[] 
range, Boolean isNull
     private Long getViewIndexValue(PDataType type, byte[] range) {
         boolean useLongViewIndex = 
MetaDataUtil.getViewIndexIdDataType().equals(type);
         Object s = type.toObject(range);
-        return (useLongViewIndex ? (Long) s : (Short) s) + (useLongViewIndex ? 
Long.MAX_VALUE : Short.MAX_VALUE) + 2;
+        return (useLongViewIndex ? (Long) s : (Short) s) + Short.MAX_VALUE + 2;
 
 Review comment:
   I guess this isn't relevant to your change, but is the `+2` for the 'L#' 
characters? If yes, can we change this to 
`LOCAL_INDEX_COLUMN_FAMILY_PREFIX.length` for better readability?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to