alamb commented on code in PR #11681:
URL: https://github.com/apache/datafusion/pull/11681#discussion_r1715246150


##########
datafusion/expr/src/expr_fn.rs:
##########
@@ -119,7 +119,46 @@ pub fn placeholder(id: impl Into<String>) -> Expr {
 /// assert_eq!(p.to_string(), "*")
 /// ```
 pub fn wildcard() -> Expr {
-    Expr::Wildcard { qualifier: None }
+    Expr::Wildcard {
+        qualifier: None,
+        options: WildcardOptions::default(),
+    }
+}
+
+/// Create an '*' [`Expr::Wildcard`] expression with the wildcard options
+pub fn wildcard_with_options(options: WildcardOptions) -> Expr {
+    Expr::Wildcard {
+        qualifier: None,
+        options,
+    }
+}
+
+/// Create an 't.*' [`Expr::Wildcard`] expression that matches all columns 
from a specific table
+///
+/// # Example
+///
+/// ```rust
+/// use datafusion_common::TableReference;
+/// use datafusion_expr::{qualified_wildcard};

Review Comment:
   If you put a `#` in front of lines in an example they are not shown but 
still compiled
   
   ```suggestion
   /// # use datafusion_common::TableReference;
   /// # use datafusion_expr::{qualified_wildcard};
   ```



##########
datafusion/expr/src/expr.rs:
##########
@@ -970,6 +976,72 @@ impl GroupingSet {
     }
 }
 
+#[derive(Clone, PartialEq, Eq, Hash, Debug, Default)]
+pub struct WildcardOptions {

Review Comment:
   as a follow on PR, can we add some doc comments to this struct explaining 
why this structure is needed and how to interpret it?
   
   It seems like the core rationale is that wildcards have different semantics 
depending on what part of the query they appear in?



-- 
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