@@ -27,7 +27,7 @@ use core::{
2727 str::FromStr,
2828};
2929use helpers::attached_token::AttachedToken;
30- use std::collections::BTreeSet ;
30+ use std::collections::HashSet ;
3131
3232use log::debug;
3333
@@ -10946,7 +10946,7 @@ impl<'a> Parser<'a> {
1094610946 let by_num = FunctionArg::Unnamed(FunctionArgExpr::Expr(Expr::Value(
1094710947 Value::SingleQuotedString(by.len().to_string()).into(),
1094810948 )));
10949- let mut fake_group_by = BTreeSet ::new();
10949+ let mut fake_group_by = HashSet ::new();
1095010950 let by = by
1095110951 .into_iter()
1095210952 .map(|x| {
@@ -10957,7 +10957,7 @@ impl<'a> Parser<'a> {
1095710957 // range_fn(func, range, fill, byc, [byv], align, to)
1095810958 // byc are length of variadic arguments [byv]
1095910959 let mut rewrite_count = 0;
10960- let mut align_fill_rewrite = |expr: Expr, columns: &mut BTreeSet <Expr>| {
10960+ let mut align_fill_rewrite = |expr: Expr, columns: &mut HashSet <Expr>| {
1096110961 rewrite_calculation_expr(&expr, true, &mut |e: &Expr| match e {
1096210962 Expr::Function(func) => {
1096310963 if let Some(ObjectNamePart::Identifier(name)) = func.name.0.first() {
@@ -15144,7 +15144,7 @@ where
1514415144 Ok(())
1514515145}
1514615146
15147- fn collect_column_from_expr(expr: &Expr, columns: &mut BTreeSet <Expr>, remove: bool) {
15147+ fn collect_column_from_expr(expr: &Expr, columns: &mut HashSet <Expr>, remove: bool) {
1514815148 let _ = walk_expr(expr, &mut |e| {
1514915149 if matches!(e, Expr::CompoundIdentifier(_) | Expr::Identifier(_)) {
1515015150 if remove {
0 commit comments