Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xudong963 committed Nov 27, 2024
1 parent 9df1f02 commit a7dce11
Showing 1 changed file with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,7 @@ impl Binder {
))
.set_span(*span));
}
return if cte_info.materialized
&& self.ctx.get_settings().get_enable_materialized_cte()?
{
self.bind_m_cte(bind_context, cte_info, &table_name, alias, span)
} else if cte_info.recursive {
return if cte_info.recursive {
if self.bind_recursive_cte {
self.bind_r_cte_scan(bind_context, cte_info, &table_name, alias)
} else {
Expand Down Expand Up @@ -123,13 +119,13 @@ impl Binder {
let bind_context = parent.unwrap().as_mut();
let cte_map = bind_context.cte_context.cte_map.clone();
if let Some(cte_info) = cte_map.get(&table_name) {
return if cte_info.materialized
&& self.ctx.get_settings().get_enable_materialized_cte()?
{
self.bind_m_cte(bind_context, cte_info, &table_name, alias, span)
} else {
self.bind_cte(*span, bind_context, &table_name, alias, cte_info)
};
return self.bind_cte(
*span,
bind_context,
&table_name,
alias,
cte_info,
);
}
parent = bind_context.parent.as_mut();
}
Expand Down

0 comments on commit a7dce11

Please sign in to comment.