abdolence opened a new pull request, #2898:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2898

   `SELECT * FROM t TABLESAMPLE RESERVOIR (100 ROWS)` fails with `Expected: end 
of statement, found: (`.
   
   GoogleSQL has `RESERVOIR` beside `BERNOULLI` as a [`TABLESAMPLE` 
method](https://github.com/google/googlesql/blob/master/docs/query-syntax.md#tablesample_operator)
 that samples a fixed number of rows. Spanner runs it 
([docs](https://cloud.google.com/spanner/docs/reference/standard-sql/query-syntax#tablesample_operator)).
 This adds the `RESERVOIR` keyword and `TableSampleMethod::Reservoir`. Like the 
other methods, it is not gated on a dialect.
   
   - `RESERVOIR` is not reserved, so `reservoir` still works as a column name 
and as a table alias;
   - BigQuery accepts any method name when parsing, then runs only `SYSTEM`;
   - `PARTITION BY` inside the parentheses and `WITH WEIGHT` from the same 
grammar are not covered here.
   
   Dialects: BigQuery
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to