Jackie-Jiang commented on code in PR #18872:
URL: https://github.com/apache/pinot/pull/18872#discussion_r3678605110


##########
pinot-common/src/main/java/org/apache/pinot/common/request/context/predicate/BaseInPredicate.java:
##########
@@ -155,4 +157,18 @@ public ByteArray[] getBytesValues() {
     }
     return bigDecimalValues;
   }
+
+  public ByteArray[] getUuidValues() {
+    ByteArray[] uuidValues = _uuidValues;
+    if (uuidValues == null) {
+      int numValues = _values.size();
+      uuidValues = new ByteArray[numValues];
+      for (int i = 0; i < numValues; i++) {
+        uuidValues[i] = new ByteArray(UuidUtils.toBytes(_values.get(i)));
+      }
+      _uuidValues = uuidValues;
+    }
+    return uuidValues;
+  }
+

Review Comment:
   (format) Remove this extra line.
   I think this is not allowed in `checkstyle` (at least it fails my local 
build), not sure how it passes here



##########
pinot-core/src/main/java/org/apache/pinot/core/operator/filter/predicate/EqualsPredicateEvaluatorFactory.java:
##########
@@ -93,8 +100,12 @@ private static final class 
DictionaryBasedEqPredicateEvaluator extends BaseDicti
 
     DictionaryBasedEqPredicateEvaluator(EqPredicate eqPredicate, Dictionary 
dictionary, DataType dataType) {
       super(eqPredicate, dictionary);
-      String predicateValue = 
PredicateUtils.getStoredValue(eqPredicate.getValue(), dataType);

Review Comment:
   UUID should be handled in `PredicateUtils.getStoredValue`



##########
pinot-common/src/main/java/org/apache/pinot/common/request/context/LiteralContext.java:
##########
@@ -171,6 +171,9 @@ private static PinotDataType getPinotDataType(DataType 
type, @Nullable Object va
         return PinotDataType.BIG_DECIMAL;
       case STRING:
         return singleValue ? PinotDataType.STRING : PinotDataType.STRING_ARRAY;
+      case UUID:
+        Preconditions.checkState(singleValue, "UUID array is not supported");

Review Comment:
   Why? We do support `UUID_ARRAY`
   Should we also update `BYTES_ARRAY`, `BOOLEAN_ARRAY`, `BIG_DECIMAL_ARRAY`? 
They are all supported



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to