MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / val

Method val

sql/sql_udf.h:74–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72 { return u_d ? u_d->returns : STRING_RESULT;}
73 bool get_arguments();
74 double val(my_bool *null_value)
75 {
76 is_null= 0;
77 if (get_arguments())
78 {
79 *null_value=1;
80 return 0.0;
81 }
82 Udf_func_double func= (Udf_func_double) u_d->func;
83 double tmp=func(&initid, &f_args, &is_null, &error);
84 if (is_null || error)
85 {
86 *null_value=1;
87 return 0.0;
88 }
89 *null_value=0;
90 return tmp;
91 }
92 longlong val_int(my_bool *null_value)
93 {
94 is_null= 0;

Callers 2

val_realMethod · 0.80
val_realMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected