Skip to content

Conversation

@niconoe-
Copy link
Contributor

Fixes #283

@codecov
Copy link

codecov bot commented Jun 22, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (88c8314) 97.02% compared to head (bf03484) 97.02%.

Additional details and impacted files
@@            Coverage Diff            @@
##              5.8.x     #487   +/-   ##
=========================================
  Coverage     97.02%   97.02%           
- Complexity     2234     2235    +1     
=========================================
  Files            69       69           
  Lines          5144     5145    +1     
=========================================
+ Hits           4991     4992    +1     
  Misses          153      153           
Impacted Files Coverage Δ
src/Components/ArrayObj.php 100.00% <ø> (ø)
src/Components/IndexHint.php 100.00% <ø> (ø)
src/Components/Expression.php 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@niconoe-
Copy link
Contributor Author

The issue was that both "AS" and "OVER" are of type "NONE", so we were entering in the alias handling too early. The "OVER" was considered as the alias part, so when the "AS" comes out, the parser wrongly interpreted it as a second alias, and failed.

With this quickfix, I force the parser to disallow "OVER" as an alias-setting keyword, so that the whole windowing process in included in the expression, and "AS" is correctly recognized as the first (and only) alias-setting keyword.

Commits are showing the difference of the tokens management, by comparing before and after.

@williamdes This time, I picked up the right branch when I created the PR, and the tests are passing 😉

@williamdes williamdes changed the title Fix MariaDB window function with alias gives bad linting errors Fix #283 - MariaDB window function with alias gives bad linting errors Jun 29, 2023
@williamdes williamdes added this to the 5.9.0 milestone Jun 29, 2023
@williamdes williamdes self-assigned this Jun 29, 2023
Copy link
Member

@williamdes williamdes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay, thank you !

@williamdes williamdes merged commit d58a8ff into phpmyadmin:5.8.x Jun 29, 2023
williamdes added a commit that referenced this pull request Jun 29, 2023
Pull-request: #487

Signed-off-by: William Desportes <[email protected]>
@niconoe- niconoe- deleted the fix-283 branch June 29, 2023 10:36
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.

SQL query editor: MariaDB window function with alias gives bad linting errors

2 participants