Skip to content

Support OVER clause for window/analytic functions and qualified function names #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 27, 2019

Conversation

nickolay
Copy link
Contributor

This implements most of what the spec calls <in-line window specification>, sans references to WINDOWs defined elsewhere and the EXCLUDE clause.

Tangentially related is the change of SQLFunction's id: SQLIdent to name: SQLObjectName and the addition of support for schema-qualified function names (db.schema.func).

Unrelated, but didn't seem to deserve its own PR is a change to make ExpressionWithAlias use named fields (I don't know why I made it a tuple in the first place..)

Since this changes SQLFunction anyway, changed its `id` field to `name`,
as we don't seem to use "id" to mean "name" anywhere else.
...e.g. `db.schema.func()`
(This produces more natural JSON representation when serializing AST
with serde.)
@coveralls
Copy link

coveralls commented Apr 20, 2019

Pull Request Test Coverage Report for Build 153

  • 159 of 182 (87.36%) changed or added relevant lines in 4 files are covered.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+1.0%) to 85.643%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tests/sqlparser_generic.rs 27 29 93.1%
src/sqlast/mod.rs 68 78 87.18%
src/sqlparser.rs 59 70 84.29%
Files with Coverage Reduction New Missed Lines %
src/sqlparser.rs 1 80.92%
tests/sqlparser_generic.rs 3 92.09%
Totals Coverage Status
Change from base Build 148: 1.0%
Covered Lines: 2750
Relevant Lines: 3211

💛 - Coveralls

@nickolay nickolay merged commit 6bb2acc into apache:master Apr 27, 2019
@nickolay nickolay deleted the window-functions branch April 27, 2019 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants