xiangfu0 commented on code in PR #18628:
URL: https://github.com/apache/pinot/pull/18628#discussion_r3330194066


##########
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/ScalarTransformFunctionWrapper.java:
##########
@@ -66,7 +66,8 @@ public ScalarTransformFunctionWrapper(FunctionInfo 
functionInfo) {
     ColumnDataType resultType = FunctionUtils.getColumnDataType(resultClass);
     if (resultType != null) {
       _resultType = resultType;

Review Comment:
   This changes every OBJECT-returning scalar UDF to advertise STRING output 
and stringify the value. That silently changes query semantics for functions 
like `nullIf`/`caseWhen`: `NULLIF(int_col, 0)` now becomes a VARCHAR result 
instead of preserving the input type, so downstream arithmetic/comparisons will 
see the wrong type. We need a type-preserving resolution here rather than 
coercing OBJECT to STRING.



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