★ wanayoo — archive 1999 https://github.com/phpmyadmin/sql-parser/issues/188Nouvelle recherche | Portail wanayoo
Skip to content
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

Support for window functions like RANK #188

Open
stevenwdv opened this issue Mar 9, 2018 · 0 comments
Open

Support for window functions like RANK #188

stevenwdv opened this issue Mar 9, 2018 · 0 comments
Labels

Comments

@stevenwdv
Copy link
Contributor

@stevenwdv stevenwdv commented Mar 9, 2018

The validator marks queries with an alias (with or without AS) after window functions like RANK, DENSE_RANK, ROW_NUMBER, CUME_DIST, etc. as incorrect:
SELECT RANK() OVER(ORDER BY NULL) rank

[
  {
    "message": "An alias was previously found. (near <code>rank</code>)",
    "fromLine": 0,
    "fromColumn": 34,
    "toLine": 0,
    "toColumn": 38,
    "severity": "error"
  },
  {
    "message": "Unexpected token. (near <code>rank</code>)",
    "fromLine": 0,
    "fromColumn": 34,
    "toLine": 0,
    "toColumn": 38,
    "severity": "error"
  }
]

Support for this type of functions is probably not present yet, but weirdly enough the validator doesn't complain for queries without alias.

PHPMyAdmin 4.7.9
MariaDB 10.3.1 (window functions are supported since 10.2.0)

Update: these will also be supported in MySQL 8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.