hendrikmakait commented on code in PR #1860:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1860#discussion_r2111252622


##########
src/ast/query.rs:
##########
@@ -2680,28 +2680,32 @@ pub enum PipeOperator {
         full_table_exprs: Vec<ExprWithAliasAndOrderBy>,
         group_by_expr: Vec<ExprWithAliasAndOrderBy>,
     },
+    /// Selects a random sample of rows from the input table.
+    /// Syntax: `|> TABLESAMPLE <method> (<size> {ROWS | PERCENT})`
+    /// See more at 
<https://cloud.google.com/bigquery/docs/reference/standard-sql/pipe-syntax#tablesample_pipe_operator>
+    TableSample { sample: Box <TableSample> },
 }
 
 impl fmt::Display for PipeOperator {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         match self {
             PipeOperator::Select { exprs } => {
-                write!(f, "SELECT {}", 
display_comma_separated(exprs.as_slice()))
+                write!(f, " SELECT {}", 
display_comma_separated(exprs.as_slice()))

Review Comment:
   Good point, I found a way to fix the formatting for `TableSample` in a 
different way that requires fewer changes and follows this general principle.



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