github-actions[bot] commented on code in PR #61786:
URL: https://github.com/apache/doris/pull/61786#discussion_r2998533773
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/FunctionToThriftConverter.java:
##########
@@ -31,6 +31,40 @@
*/
public class FunctionToThriftConverter {
+ /**
+ * Converts a {@link Function.BinaryType} to its Thrift representation.
+ */
+ public static TFunctionBinaryType toThriftBinaryType(Function.BinaryType
binaryType) {
+ switch (binaryType) {
+ case BUILTIN: return TFunctionBinaryType.BUILTIN;
+ case HIVE: return TFunctionBinaryType.HIVE;
+ case NATIVE: return TFunctionBinaryType.NATIVE;
+ case IR: return TFunctionBinaryType.IR;
+ case RPC: return TFunctionBinaryType.RPC;
+ case JAVA_UDF: return TFunctionBinaryType.JAVA_UDF;
+ case AGG_STATE: return TFunctionBinaryType.AGG_STATE;
+ case PYTHON_UDF: return TFunctionBinaryType.PYTHON_UDF;
+ default: throw new IllegalArgumentException("Unknown BinaryType: "
+ binaryType);
+ }
+ }
+
+ /**
+ * Converts a Thrift {@link TFunctionBinaryType} to {@link
Function.BinaryType}.
+ */
+ public static Function.BinaryType fromThriftBinaryType(TFunctionBinaryType
thriftType) {
Review Comment:
Nit: `fromThriftBinaryType()` is currently dead code — there are zero
callers in the entire codebase. The FE only converts `Function.BinaryType` →
`TFunctionBinaryType` (when sending to BE), never the reverse direction.
Consider either removing this method to keep the diff minimal and avoid unused
code, or adding a brief comment explaining its anticipated future use.
--
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]