@@ -39,7 +39,7 @@ extern "C" const char *duckdb_vx_expr_get_bound_column_ref_get_name(duckdb_vx_ex
3939 if (!ffi_expr) {
4040 return nullptr ;
4141 }
42- auto expr = reinterpret_cast <Expression *>(ffi_expr)->Cast <BoundColumnRefExpression>();
42+ auto & expr = reinterpret_cast <Expression *>(ffi_expr)->Cast <BoundColumnRefExpression>();
4343 auto str = expr.GetName ();
4444 auto result = static_cast <char *>(duckdb_malloc (str.size () + 1 ));
4545 memcpy (result, str.c_str (), str.size () + 1 );
@@ -50,7 +50,7 @@ extern "C" duckdb_value duckdb_vx_expr_bound_constant_get_value(duckdb_vx_expr f
5050 if (!ffi_expr) {
5151 return nullptr ;
5252 }
53- auto expr = reinterpret_cast <Expression *>(ffi_expr)->Cast <BoundConstantExpression>();
53+ auto & expr = reinterpret_cast <Expression *>(ffi_expr)->Cast <BoundConstantExpression>();
5454 return reinterpret_cast <duckdb_value>(&expr.value );
5555}
5656
@@ -59,7 +59,7 @@ extern "C" void duckdb_vx_expr_get_bound_comparison(duckdb_vx_expr ffi_expr,
5959 if (!ffi_expr || !out) {
6060 return ;
6161 }
62- auto expr = reinterpret_cast <Expression *>(ffi_expr)->Cast <BoundComparisonExpression>();
62+ auto & expr = reinterpret_cast <Expression *>(ffi_expr)->Cast <BoundComparisonExpression>();
6363 out->left = reinterpret_cast <duckdb_vx_expr>(expr.left .get ());
6464 out->right = reinterpret_cast <duckdb_vx_expr>(expr.right .get ());
6565 out->type = static_cast <duckdb_vx_expr_type>(expr.type );
@@ -71,7 +71,7 @@ extern "C" void duckdb_vx_expr_get_bound_conjunction(duckdb_vx_expr ffi_expr,
7171 return ;
7272 }
7373
74- auto expr = reinterpret_cast <Expression *>(ffi_expr)->Cast <BoundConjunctionExpression>();
74+ auto & expr = reinterpret_cast <Expression *>(ffi_expr)->Cast <BoundConjunctionExpression>();
7575 out->children_count = expr.children .size ();
7676 out->children = reinterpret_cast <duckdb_vx_expr *>(expr.children .data ());
7777 out->type = static_cast <duckdb_vx_expr_type>(expr.type );
@@ -81,7 +81,7 @@ extern "C" void duckdb_vx_expr_get_bound_between(duckdb_vx_expr ffi_expr, duckdb
8181 if (!ffi_expr || !out) {
8282 return ;
8383 }
84- auto expr = reinterpret_cast <Expression *>(ffi_expr)->Cast <BoundBetweenExpression>();
84+ auto & expr = reinterpret_cast <Expression *>(ffi_expr)->Cast <BoundBetweenExpression>();
8585 out->input = reinterpret_cast <duckdb_vx_expr>(expr.input .get ());
8686 out->lower = reinterpret_cast <duckdb_vx_expr>(expr.lower .get ());
8787 out->upper = reinterpret_cast <duckdb_vx_expr>(expr.upper .get ());
@@ -94,7 +94,7 @@ extern "C" void duckdb_vx_expr_get_bound_operator(duckdb_vx_expr ffi_expr,
9494 if (!ffi_expr || !out) {
9595 return ;
9696 }
97- auto expr = reinterpret_cast <Expression *>(ffi_expr)->Cast <BoundOperatorExpression>();
97+ auto & expr = reinterpret_cast <Expression *>(ffi_expr)->Cast <BoundOperatorExpression>();
9898 out->children_count = expr.children .size ();
9999 out->children = reinterpret_cast <duckdb_vx_expr *>(expr.children .data ());
100100 out->type = static_cast <duckdb_vx_expr_type>(expr.type );
@@ -105,7 +105,7 @@ extern "C" void duckdb_vx_expr_get_bound_function(duckdb_vx_expr ffi_expr,
105105 if (!ffi_expr || !out) {
106106 return ;
107107 }
108- auto expr = reinterpret_cast <Expression *>(ffi_expr)->Cast <BoundFunctionExpression>();
108+ auto & expr = reinterpret_cast <Expression *>(ffi_expr)->Cast <BoundFunctionExpression>();
109109 out->children_count = expr.children .size ();
110110 out->children = reinterpret_cast <duckdb_vx_expr *>(expr.children .data ());
111111 out->scalar_function = reinterpret_cast <duckdb_vx_sfunc>(&expr.function );
0 commit comments