Skip to content

Commit 349f32a

Browse files
committed
Drop remaining __ggsql_stat_ columns not consumed by remappings
1 parent 24a1b94 commit 349f32a

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/execute/layer.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,17 @@ pub fn apply_remappings_post_query(df: DataFrame, layer: &Layer) -> Result<DataF
150150
}
151151
}
152152

153+
// Drop any remaining __ggsql_stat_* columns that weren't consumed by remappings.
154+
let stat_cols: Vec<String> = df
155+
.get_column_names()
156+
.into_iter()
157+
.filter(|name| naming::is_stat_column(name))
158+
.map(|name| name.to_string())
159+
.collect();
160+
if !stat_cols.is_empty() {
161+
df = df.drop_many(stat_cols);
162+
}
163+
153164
Ok(df)
154165
}
155166

0 commit comments

Comments
 (0)