@@ -35,7 +35,7 @@ pub fn codegen_register() {
35
35
use std::sync::Arc;
36
36
37
37
use crate::Function;
38
- use crate::FunctionContext ;
38
+ use crate::EvalContext ;
39
39
use crate::FunctionDomain;
40
40
use crate::FunctionRegistry;
41
41
use crate::FunctionSignature;
@@ -82,7 +82,7 @@ pub fn codegen_register() {
82
82
func: G,
83
83
) where
84
84
F: Fn({arg_f_closure_sig}) -> FunctionDomain<O> + 'static + Clone + Copy + Send + Sync,
85
- G: Fn({arg_g_closure_sig} FunctionContext ) -> O::Scalar + 'static + Clone + Copy + Send + Sync,
85
+ G: Fn({arg_g_closure_sig} EvalContext ) -> O::Scalar + 'static + Clone + Copy + Send + Sync,
86
86
{{
87
87
self.register_passthrough_nullable_{n_args}_arg::<{arg_generics} O, _, _>(
88
88
name,
@@ -154,7 +154,7 @@ pub fn codegen_register() {
154
154
func: G,
155
155
) where
156
156
F: Fn({arg_f_closure_sig}) -> FunctionDomain<O> + 'static + Clone + Copy + Send + Sync,
157
- G: for<'a> Fn({arg_g_closure_sig} FunctionContext ) -> Result<Value<O>, String> + 'static + Clone + Copy + Send + Sync,
157
+ G: for<'a> Fn({arg_g_closure_sig} EvalContext ) -> Result<Value<O>, String> + 'static + Clone + Copy + Send + Sync,
158
158
{{
159
159
let has_nullable = &[{arg_sig_type} O::data_type()]
160
160
.iter()
@@ -257,7 +257,7 @@ pub fn codegen_register() {
257
257
func: G,
258
258
) where
259
259
F: Fn({arg_f_closure_sig}) -> FunctionDomain<NullableType<O>> + 'static + Clone + Copy + Send + Sync,
260
- G: for<'a> Fn({arg_g_closure_sig} FunctionContext ) -> Result<Value<NullableType<O>>, String> + 'static + Clone + Copy + Send + Sync,
260
+ G: for<'a> Fn({arg_g_closure_sig} EvalContext ) -> Result<Value<NullableType<O>>, String> + 'static + Clone + Copy + Send + Sync,
261
261
{{
262
262
let has_nullable = &[{arg_sig_type} O::data_type()]
263
263
.iter()
@@ -340,7 +340,7 @@ pub fn codegen_register() {
340
340
func: G,
341
341
) where
342
342
F: Fn({arg_f_closure_sig}) -> FunctionDomain<O> + 'static + Clone + Copy + Send + Sync,
343
- G: for <'a> Fn({arg_g_closure_sig} FunctionContext ) -> Result<Value<O>, String> + 'static + Clone + Copy + Send + Sync,
343
+ G: for <'a> Fn({arg_g_closure_sig} EvalContext ) -> Result<Value<O>, String> + 'static + Clone + Copy + Send + Sync,
344
344
{{
345
345
self.funcs
346
346
.entry(name.to_string())
@@ -441,8 +441,8 @@ pub fn codegen_register() {
441
441
source,
442
442
"
443
443
pub fn vectorize_{n_args}_arg<{arg_generics_bound} O: ArgType>(
444
- func: impl Fn({arg_input_closure_sig} FunctionContext ) -> O::Scalar + Copy + Send + Sync,
445
- ) -> impl Fn({arg_output_closure_sig} FunctionContext ) -> Result<Value<O>, String> + Copy + Send + Sync {{
444
+ func: impl Fn({arg_input_closure_sig} EvalContext ) -> O::Scalar + Copy + Send + Sync,
445
+ ) -> impl Fn({arg_output_closure_sig} EvalContext ) -> Result<Value<O>, String> + Copy + Send + Sync {{
446
446
move |{func_args} ctx| match ({args_tuple}) {{
447
447
({arg_scalar}) => Ok(Value::Scalar(func({func_args} ctx))),
448
448
{match_arms}
@@ -535,8 +535,8 @@ pub fn codegen_register() {
535
535
source,
536
536
"
537
537
pub fn vectorize_with_builder_{n_args}_arg<{arg_generics_bound} O: ArgType>(
538
- func: impl Fn({arg_input_closure_sig} &mut O::ColumnBuilder, FunctionContext ) -> Result<(), String> + Copy + Send + Sync,
539
- ) -> impl Fn({arg_output_closure_sig} FunctionContext ) -> Result<Value<O>, String> + Copy + Send + Sync {{
538
+ func: impl Fn({arg_input_closure_sig} &mut O::ColumnBuilder, EvalContext ) -> Result<(), String> + Copy + Send + Sync,
539
+ ) -> impl Fn({arg_output_closure_sig} EvalContext ) -> Result<Value<O>, String> + Copy + Send + Sync {{
540
540
move |{func_args} ctx| match ({args_tuple}) {{
541
541
({arg_scalar}) => {{
542
542
let mut builder = O::create_builder(1, ctx.generics);
@@ -640,8 +640,8 @@ pub fn codegen_register() {
640
640
source,
641
641
"
642
642
pub fn passthrough_nullable_{n_args}_arg<{arg_generics_bound} O: ArgType>(
643
- func: impl for <'a> Fn({arg_input_closure_sig} FunctionContext ) -> Result<Value<O>, String> + Copy + Send + Sync,
644
- ) -> impl for <'a> Fn({arg_output_closure_sig} FunctionContext ) -> Result<Value<NullableType<O>>, String> + Copy + Send + Sync {{
643
+ func: impl for <'a> Fn({arg_input_closure_sig} EvalContext ) -> Result<Value<O>, String> + Copy + Send + Sync,
644
+ ) -> impl for <'a> Fn({arg_output_closure_sig} EvalContext ) -> Result<Value<NullableType<O>>, String> + Copy + Send + Sync {{
645
645
move |{closure_args} ctx| match ({args_tuple}) {{
646
646
{scalar_nones_pats} => Ok(Value::Scalar(None)),
647
647
({arg_scalar}) => Ok(Value::Scalar(Some(
@@ -747,8 +747,8 @@ pub fn codegen_register() {
747
747
source,
748
748
"
749
749
pub fn combine_nullable_{n_args}_arg<{arg_generics_bound} O: ArgType>(
750
- func: impl for <'a> Fn({arg_input_closure_sig} FunctionContext ) -> Result<Value<NullableType<O>>, String> + Copy + Send + Sync,
751
- ) -> impl for <'a> Fn({arg_output_closure_sig} FunctionContext ) -> Result<Value<NullableType<O>>, String> + Copy + Send + Sync {{
750
+ func: impl for <'a> Fn({arg_input_closure_sig} EvalContext ) -> Result<Value<NullableType<O>>, String> + Copy + Send + Sync,
751
+ ) -> impl for <'a> Fn({arg_output_closure_sig} EvalContext ) -> Result<Value<NullableType<O>>, String> + Copy + Send + Sync {{
752
752
move |{closure_args} ctx| match ({args_tuple}) {{
753
753
{scalar_nones_pats} => Ok(Value::Scalar(None)),
754
754
({arg_scalar}) => Ok(Value::Scalar(
@@ -825,8 +825,8 @@ pub fn codegen_register() {
825
825
source,
826
826
"
827
827
fn erase_function_generic_{n_args}_arg<{arg_generics_bound} O: ArgType>(
828
- func: impl for <'a> Fn({arg_g_closure_sig} FunctionContext ) -> Result<Value<O>, String>,
829
- ) -> impl Fn(&[ValueRef<AnyType>], FunctionContext ) -> Result<Value<AnyType>, String> {{
828
+ func: impl for <'a> Fn({arg_g_closure_sig} EvalContext ) -> Result<Value<O>, String>,
829
+ ) -> impl Fn(&[ValueRef<AnyType>], EvalContext ) -> Result<Value<AnyType>, String> {{
830
830
move |args, ctx| {{
831
831
{let_args}
832
832
func({func_args} ctx).map(Value::upcast)
0 commit comments