(sql: &str)
| 192 | use crate::parser::statement::parse_sql; |
| 193 | |
| 194 | fn select_of(sql: &str) -> Box<ast::Select> { |
| 195 | match parse_sql(sql).unwrap().into_iter().next().unwrap() { |
| 196 | ast::Statement::Query(q) => match *q.body { |
| 197 | ast::SetExpr::Select(s) => s, |
| 198 | _ => panic!("not a SELECT"), |
| 199 | }, |
| 200 | _ => panic!("not a query"), |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | #[test] |
| 205 | fn named_window_referenced_by_multiple_functions() { |