mneedham commented on a change in pull request #8001:
URL: https://github.com/apache/pinot/pull/8001#discussion_r786099857
##########
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:
@richardstartin can I have it inlined like this?
I did try to do it as a supplier, but it ends up being a big mess because
you have to create a tmp final variable for transform function for every
message so that you can use it inside the supplier function.
--
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]