Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Oct 26, 2024
1 parent 71cc18c commit 659823a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/cpp11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@ static const R_CallMethodDef CallEntries[] = {
{"_duckdb_rapi_disconnect", (DL_FUNC) &_duckdb_rapi_disconnect, 1},
{"_duckdb_rapi_execute", (DL_FUNC) &_duckdb_rapi_execute, 3},
{"_duckdb_rapi_execute_arrow", (DL_FUNC) &_duckdb_rapi_execute_arrow, 2},
{"_duckdb_rapi_expr_constant", (DL_FUNC) &_duckdb_rapi_expr_constant, 1},
{"_duckdb_rapi_expr_comparison", (DL_FUNC) &_duckdb_rapi_expr_comparison, 2},
{"_duckdb_rapi_expr_constant", (DL_FUNC) &_duckdb_rapi_expr_constant, 1},
{"_duckdb_rapi_expr_function", (DL_FUNC) &_duckdb_rapi_expr_function, 4},
{"_duckdb_rapi_expr_reference", (DL_FUNC) &_duckdb_rapi_expr_reference, 1},
{"_duckdb_rapi_expr_set_alias", (DL_FUNC) &_duckdb_rapi_expr_set_alias, 2},
Expand Down
9 changes: 4 additions & 5 deletions src/reltoaltrep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,15 @@ struct AltrepRelationWrapper {
// https://github.com/duckdb/duckdb-r/issues/101
auto old_depth = rel->context.GetContext()->config.max_expression_depth;
rel->context.GetContext()->config.max_expression_depth = old_depth * 2;
duckdb_httplib::detail::scope_exit reset_max_expression_depth([&]() {
rel->context.GetContext()->config.max_expression_depth = old_depth;
});
duckdb_httplib::detail::scope_exit reset_max_expression_depth(
[&]() { rel->context.GetContext()->config.max_expression_depth = old_depth; });

res = rel->Execute();

// FIXME: Use std::experimental::scope_exit
if (rel->context.GetContext()->config.max_expression_depth != old_depth * 2) {
Rprintf("Internal error: max_expression_depth was changed from %" PRIu64 " to %" PRIu64 "\n", old_depth * 2,
rel->context.GetContext()->config.max_expression_depth);
Rprintf("Internal error: max_expression_depth was changed from %" PRIu64 " to %" PRIu64 "\n",
old_depth * 2, rel->context.GetContext()->config.max_expression_depth);
}
rel->context.GetContext()->config.max_expression_depth = old_depth;
reset_max_expression_depth.release();
Expand Down

0 comments on commit 659823a

Please sign in to comment.