tkhurana commented on code in PR #1712:
URL: https://github.com/apache/phoenix/pull/1712#discussion_r1399614634


##########
phoenix-core/src/main/java/org/apache/phoenix/iterate/NonAggregateRegionScannerFactory.java:
##########
@@ -232,31 +277,40 @@ static OrderedResultIterator deserializeFromScan(Scan 
scan, RegionScanner s,
         }
     }
 
-    private Expression[] deserializeArrayPositionalExpressionInfoFromScan(Scan 
scan, RegionScanner s,
-                                                                          
Set<KeyValueColumnExpression> arrayKVRefs) {
-        byte[] specificArrayIdx = 
scan.getAttribute(BaseScannerRegionObserver.SPECIFIC_ARRAY_INDEX);
+    private Expression[] 
deserializeServerParsedPositionalExpressionInfoFromScan(Scan scan,
+            String scanAttribute, Set<KeyValueColumnExpression> 
serverParsedKVRefs) {
+        byte[] specificArrayIdx = scan.getAttribute(scanAttribute);
         if (specificArrayIdx == null) {
             return null;
         }
         ByteArrayInputStream stream = new 
ByteArrayInputStream(specificArrayIdx);
         try {
             DataInputStream input = new DataInputStream(stream);
-            int arrayKVRefSize = WritableUtils.readVInt(input);
-            for (int i = 0; i < arrayKVRefSize; i++) {
+            int kvRefSize = WritableUtils.readVInt(input);
+            for (int i = 0; i < kvRefSize; i++) {
                 PTable.ImmutableStorageScheme scheme = 
EncodedColumnsUtil.getImmutableStorageScheme(scan);
                 KeyValueColumnExpression kvExp = scheme != 
PTable.ImmutableStorageScheme.ONE_CELL_PER_COLUMN ? new 
SingleCellColumnExpression(scheme)
                         : new KeyValueColumnExpression();
                 kvExp.readFields(input);
-                arrayKVRefs.add(kvExp);
+                serverParsedKVRefs.add(kvExp);
             }
-            int arrayKVFuncSize = WritableUtils.readVInt(input);
-            Expression[] arrayFuncRefs = new Expression[arrayKVFuncSize];
-            for (int i = 0; i < arrayKVFuncSize; i++) {
-                ArrayIndexFunction arrayIdxFunc = new ArrayIndexFunction();
-                arrayIdxFunc.readFields(input);
-                arrayFuncRefs[i] = arrayIdxFunc;
+            int kvFuncSize = WritableUtils.readVInt(input);
+            Expression[] funcRefs = new Expression[kvFuncSize];
+            for (int i = 0; i < kvFuncSize; i++) {

Review Comment:
   Is there ever a case where the value of the variable kvFuncSize is > 1 ?



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to