iffyio commented on code in PR #1680:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1680#discussion_r1930933187


##########
tests/sqlparser_common.rs:
##########
@@ -1050,6 +1053,84 @@ fn parse_column_aliases() {
     one_statement_parses_to("SELECT a.col + 1 newname FROM foo AS a", sql);
 }
 
+#[test]
+fn parse_select_expr_star() {
+    let dialects = all_dialects_where(|d| d.supports_select_expr_star());
+
+    // Identifier wildcard expansion.
+    let select = dialects.verified_only_select("SELECT foo.bar.* FROM T");
+    let 
SelectItem::QualifiedWildcard(SelectItemQualifiedWildcardKind::ObjectName(object_name),
 _) =
+        only(&select.projection)
+    else {
+        unreachable!(
+            "expected wildcard select item: got {:?}",
+            &select.projection[0]
+        )
+    };
+    assert_eq!(
+        &ObjectName::from(
+            ["foo", "bar"]
+                .into_iter()
+                .map(Ident::new)
+                .collect::<Vec<_>>()
+        ),
+        object_name
+    );
+
+    // Arbitrary compound expression with wildcard expansion.
+    let select = dialects.verified_only_select("SELECT foo - bar.* FROM T");

Review Comment:
    :sweat_smile: thankfully the query isn't semantically valid, maybe the test 
is misleading in that sense, I added it only to verify that the parser accepts 
arbitrary expressions and wildcard on variables, but as far as binary operators 
specifically combined with the wildcard syntax wouldn't have meaning in 
BigQuery either



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to