apache / datafusion-sqlparser-rs

Extensible SQL Lexer and Parser for Rust
Apache License 2.0
2.8k stars 543 forks source link

Add support for TOP before ALL/DISTINCT #1495

Closed yoavcloud closed 2 weeks ago

yoavcloud commented 3 weeks ago

Adds support for dialects (Redshift) that expect the TOP keyword in a SELECT statement to appear before the ALL/DISTINCT option. For example: SELECT TOP 2 DISTINCT FROM tbl; https://docs.aws.amazon.com/redshift/latest/dg/r_SELECT_list.html

coveralls commented 2 weeks ago

Pull Request Test Coverage Report for Build 11707166854

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/dialect/mod.rs 1 2 50.0%
src/dialect/redshift.rs 1 2 50.0%
<!-- Total: 23 25 92.0% -->
Totals Coverage Status
Change from base Build 11707125112: 0.0%
Covered Lines: 30587
Relevant Lines: 34217

💛 - Coveralls
alamb commented 2 weeks ago

Thanks @yoavcloud and @iffyio