Skip to content

Commit 0a01a79

Browse files
committed
clean up
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent b24fd1b commit 0a01a79

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vortex-duckdb-ext/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ duckdb = { git = "https://github.com/vortex-data/duckdb-rs", rev = "247ffb36c41b
3131
] }
3232
glob = { workspace = true }
3333
itertools = { workspace = true }
34+
log = { workspace = true }
3435
num-traits = { workspace = true }
3536
tempfile = { workspace = true }
3637
tokio = { workspace = true, features = ["macros", "rt"] }

vortex-duckdb-ext/cpp/expr.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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);

vortex-duckdb-ext/src/convert/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ pub fn try_from_bound_expression(value: &Expression) -> VortexResult<Option<Expr
168168
Like::new_expr(value, pattern, false, false)
169169
}
170170
_ => {
171-
// todo!("bound function {}", func.scalar_function.name())
171+
log::warn!("bound function {}", func.scalar_function.name());
172172
return Ok(None);
173173
}
174174
},

0 commit comments

Comments
 (0)