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

Fix bug causing multiple nested nots to parse very slowly #436

Merged
merged 1 commit into from
Sep 9, 2021

Conversation

dlurton
Copy link
Member

@dlurton dlurton commented Sep 9, 2021

Refactors SqlParser.parseUnaryTerm so it does not attempt to
needlessly re-parse every sub-expression of the not unary operator.
This effect was cumulative, so that multiple nestings of not would
become pathologically slow.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Refactors `SqlParser.parseUnaryTerm` so it does not attempt to
needlessly re-parse every sub-expression of the `not` unary operator.
This effect was cumulative, so that multiple nestings of `not` would
become pathologically slow.
@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2021

Codecov Report

Merging #436 (d64ea50) into main (6eeeea4) will decrease coverage by 0.02%.
The diff coverage is 86.66%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #436      +/-   ##
============================================
- Coverage     82.33%   82.31%   -0.03%     
+ Complexity     1396     1394       -2     
============================================
  Files           171      171              
  Lines         10724    10723       -1     
  Branches       1768     1769       +1     
============================================
- Hits           8830     8827       -3     
  Misses         1353     1353              
- Partials        541      543       +2     
Flag Coverage Δ
CLI 18.18% <ø> (ø)
EXAMPLES 74.85% <ø> (ø)
LANG 84.81% <86.66%> (-0.03%) ⬇️
PTS ∅ <ø> (∅)
TEST_SCRIPT 79.68% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lang/src/org/partiql/lang/syntax/SqlParser.kt 79.69% <86.66%> (-0.16%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6eeeea4...d64ea50. Read the comment docs.

@dlurton dlurton merged commit 6de9ca0 into main Sep 9, 2021
@dlurton dlurton deleted the cpu-use-bug branch September 9, 2021 20:51
alancai98 pushed a commit that referenced this pull request Sep 13, 2021
Refactors `SqlParser.parseUnaryTerm` so it does not attempt to
needlessly re-parse every sub-expression of the `not` unary operator.
This effect was cumulative, so that multiple nestings of `not` would
become pathologically slow.

(cherry picked from commit 6de9ca0)
alancai98 pushed a commit that referenced this pull request Sep 13, 2021
Refactors `SqlParser.parseUnaryTerm` so it does not attempt to
needlessly re-parse every sub-expression of the `not` unary operator.
This effect was cumulative, so that multiple nestings of `not` would
become pathologically slow.

(cherry picked from commit 6de9ca0)
alancai98 added a commit that referenced this pull request Sep 13, 2021
)

Refactors `SqlParser.parseUnaryTerm` so it does not attempt to
needlessly re-parse every sub-expression of the `not` unary operator.
This effect was cumulative, so that multiple nestings of `not` would
become pathologically slow.

(cherry picked from commit 6de9ca0)
alancai98 added a commit that referenced this pull request Sep 13, 2021
)

Refactors `SqlParser.parseUnaryTerm` so it does not attempt to
needlessly re-parse every sub-expression of the `not` unary operator.
This effect was cumulative, so that multiple nestings of `not` would
become pathologically slow.

(cherry picked from commit 6de9ca0)
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