github-actions[bot] commented on code in PR #61276:
URL: https://github.com/apache/doris/pull/61276#discussion_r3014254273


##########
be/src/exprs/function/cast/cast_wrapper_decls.h:
##########
@@ -0,0 +1,53 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+
+#include "exprs/function/cast/cast_base.h"
+
+namespace doris::CastWrapper {
+
+// Implemented in function_cast_int.cpp
+WrapperType create_int_wrapper(FunctionContext* context, const DataTypePtr& 
from_type,
+                               PrimitiveType to_type);
+
+// Implemented in function_cast_float.cpp
+WrapperType create_float_wrapper(FunctionContext* context, const DataTypePtr& 
from_type,
+                                 PrimitiveType to_type);
+
+// Implemented in function_cast_decimal.cpp
+WrapperType create_decimal_wrapper(FunctionContext* context, const 
DataTypePtr& from_type,
+                                   PrimitiveType to_type);
+
+// Implemented in function_cast_date.cpp (handles DATE / DATETIME / DATEv2 / 
DATETIMEv2 / TIMEv2)
+WrapperType create_datelike_wrapper(FunctionContext* context, const 
DataTypePtr& from_type,
+                                    PrimitiveType to_type);
+
+// Implemented in function_cast_date.cpp

Review Comment:
   Nit: This comment is incorrect. `create_timestamptz_wrapper` is implemented 
in `function_cast_timestamptz.cpp`, not `function_cast_date.cpp`.
   
   ```suggestion
   // Implemented in function_cast_timestamptz.cpp
   ```



##########
be/src/exprs/function/cast/cast_wrapper_decls.h:
##########
@@ -0,0 +1,53 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+
+#include "exprs/function/cast/cast_base.h"
+
+namespace doris::CastWrapper {
+
+// Implemented in function_cast_int.cpp
+WrapperType create_int_wrapper(FunctionContext* context, const DataTypePtr& 
from_type,
+                               PrimitiveType to_type);
+
+// Implemented in function_cast_float.cpp
+WrapperType create_float_wrapper(FunctionContext* context, const DataTypePtr& 
from_type,
+                                 PrimitiveType to_type);
+
+// Implemented in function_cast_decimal.cpp
+WrapperType create_decimal_wrapper(FunctionContext* context, const 
DataTypePtr& from_type,
+                                   PrimitiveType to_type);
+
+// Implemented in function_cast_date.cpp (handles DATE / DATETIME / DATEv2 / 
DATETIMEv2 / TIMEv2)
+WrapperType create_datelike_wrapper(FunctionContext* context, const 
DataTypePtr& from_type,
+                                    PrimitiveType to_type);
+
+// Implemented in function_cast_date.cpp
+WrapperType create_timestamptz_wrapper(FunctionContext* context, const 
DataTypePtr& from_type);
+
+// Implemented in function_cast_ip.cpp
+WrapperType create_ip_wrapper(FunctionContext* context, const DataTypePtr& 
from_type,
+                              PrimitiveType to_type);
+
+// Implemented in function_cast_bool.cpp
+WrapperType create_boolean_wrapper(FunctionContext* context, const 
DataTypePtr& from_type);
+
+// Implemented in function_cast_string.cpp

Review Comment:
   Nit: This comment says "Implemented in function_cast_string.cpp" but that 
file does not exist in this PR (and doesn't exist in the codebase). The actual 
implementation remains as an `inline` function in `cast_to_string.h` (line 
562). This works because `function_cast.cpp` transitively includes 
`cast_to_string.h` via `cast_to_jsonb.h`/`cast_to_variant.h`, but the comment 
is misleading.
   
   Consider either:
   - Moving the implementation to a new `function_cast_string.cpp` (consistent 
with the pattern of this PR), or
   - Updating the comment:
   ```suggestion
   // Implemented inline in cast_to_string.h
   ```



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