We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c0d088 commit 571e326Copy full SHA for 571e326
tests/sqlparser_bigquery.rs
@@ -313,6 +313,24 @@ fn test_select_wildcard_with_except() {
313
);
314
}
315
316
+#[test]
317
+fn test_select_wildcard_with_replace() {
318
+ let select = bigquery_and_generic().verified_only_select(r#"WITH orders AS
319
+ (SELECT 5 as order_id,
320
+ "sprocket" as item_name,
321
+ 200 as quantity)
322
+ SELECT * REPLACE ("widget" AS item_name)
323
+ FROM orders;"#);
324
+ let expected = SelectItem::Wildcard(WildcardAdditionalOptions {
325
+ opt_except: Some(ExceptSelectItem {
326
+ first_element: Ident::new("col_a"),
327
+ additional_elements: vec![],
328
+ }),
329
+ ..Default::default()
330
+ });
331
+ assert_eq!(expected, select.projection[0]);
332
+}
333
+
334
fn bigquery() -> TestedDialects {
335
TestedDialects {
336
dialects: vec![Box::new(BigQueryDialect {})],
0 commit comments