richardstartin commented on a change in pull request #8001:
URL: https://github.com/apache/pinot/pull/8001#discussion_r785143354



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/BaseTransformFunction.java
##########
@@ -79,6 +79,18 @@ public Dictionary getDictionary() {
     throw new UnsupportedOperationException();
   }
 
+  protected String notBytesErrorMessage(TransformFunction transformFunction) {
+    return notBytesErrorMessage(transformFunction, "first");
+  }
+
+  protected String notBytesErrorMessage(TransformFunction transformFunction, 
String argumentPosition) {
+    return String.format("The %s argument must be of type %s , but was %s",
+        argumentPosition,
+        DataType.BYTES,
+        transformFunction.getResultMetadata().getDataType()
+    );
+  }

Review comment:
       You could probably do it as a supplier which you only call get on when 
the condition is true




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