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


##########
be/src/vec/functions/math.cpp:
##########
@@ -214,10 +216,33 @@ struct NamePositive {
 
 using FunctionPositive = FunctionUnaryArithmetic<PositiveImpl, NamePositive>;
 
-struct SinName {
+struct UnaryFunctionPlainSin {
+    using Type = DataTypeFloat64;
     static constexpr auto name = "sin";
+    using FuncType = double (*)(double);
+
+    static FuncType get_sin_func() {
+        void* handle = dlopen("libm.so.6", RTLD_LAZY);
+
+        if (!handle) {
+            return std::sin;
+        }
+
+        double (*sin_func)(double) = (double (*)(double))dlsym(handle, "sin");

Review Comment:
   warning: use auto when initializing with a cast to avoid duplicating the 
type name [modernize-use-auto]
   
   ```suggestion
           auto = (double (*)(double))dlsym(handle, "sin");
   ```
   



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