Skip to content

Commit e98e6b3

Browse files
x
1 parent c05e297 commit e98e6b3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/parser/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use core::{
2727
str::FromStr,
2828
};
2929
use helpers::attached_token::AttachedToken;
30-
use std::collections::BTreeSet;
30+
use std::collections::HashSet;
3131

3232
use log::debug;
3333

@@ -10423,7 +10423,7 @@ impl<'a> Parser<'a> {
1042310423
let by_num = FunctionArg::Unnamed(FunctionArgExpr::Expr(Expr::Value(
1042410424
Value::SingleQuotedString(by.len().to_string()),
1042510425
)));
10426-
let mut fake_group_by = BTreeSet::new();
10426+
let mut fake_group_by = HashSet::new();
1042710427
let by = by
1042810428
.into_iter()
1042910429
.map(|x| {
@@ -10434,7 +10434,7 @@ impl<'a> Parser<'a> {
1043410434
// range_fn(func, range, fill, byc, [byv], align, to)
1043510435
// byc are length of variadic arguments [byv]
1043610436
let mut rewrite_count = 0;
10437-
let mut align_fill_rewrite = |expr: Expr, columns: &mut BTreeSet<Expr>| {
10437+
let mut align_fill_rewrite = |expr: Expr, columns: &mut HashSet<Expr>| {
1043810438
rewrite_calculation_expr(&expr, true, &mut |e: &Expr| match e {
1043910439
Expr::Function(func) => {
1044010440
if let Some(name) = func.name.0.first() {
@@ -14350,7 +14350,7 @@ where
1435014350
Ok(())
1435114351
}
1435214352

14353-
fn collect_column_from_expr(expr: &Expr, columns: &mut BTreeSet<Expr>, remove: bool) {
14353+
fn collect_column_from_expr(expr: &Expr, columns: &mut HashSet<Expr>, remove: bool) {
1435414354
let _ = walk_expr(expr, &mut |e| {
1435514355
if matches!(e, Expr::CompoundIdentifier(_) | Expr::Identifier(_)) {
1435614356
if remove {

0 commit comments

Comments
 (0)