Skip to content

Commit db681e9

Browse files
teunbrandclaude
andcommitted
Rename does_consume_cte to has_executable_sql
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ba38f64 commit db681e9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/execute/cte.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ pub fn transform_global_sql(
235235
);
236236
}
237237

238-
if !does_consume_cte(source_tree) {
238+
if !has_executable_sql(source_tree) {
239239
return (vec![], None);
240240
}
241241

@@ -276,7 +276,7 @@ pub fn transform_global_sql(
276276
if !side_effects.is_empty() || viz_from_query.is_some() {
277277
(side_effects, viz_from_query)
278278
} else {
279-
// does_consume_cte was true but we found no specific statements or
279+
// has_executable_sql was true but we found no specific statements or
280280
// VISUALISE FROM — fall back to extract_sql as the query.
281281
let query = source_tree
282282
.extract_sql()
@@ -291,7 +291,7 @@ pub fn transform_global_sql(
291291
/// This handles cases like `WITH a AS (...), b AS (...) VISUALISE` where the WITH
292292
/// clause has no trailing SELECT - these CTEs are still extracted for layer use
293293
/// but shouldn't be executed as global data.
294-
pub fn does_consume_cte(source_tree: &SourceTree) -> bool {
294+
pub fn has_executable_sql(source_tree: &SourceTree) -> bool {
295295
let root = source_tree.root();
296296

297297
// Check for direct executable statements (SELECT, CREATE, INSERT, UPDATE,

0 commit comments

Comments
 (0)