Skip to content

Fix parsing of TRIM specification keywords (BOTH, LEADING, and TRAILING) #326

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 3 commits into from
Dec 8, 2020

Conversation

alancai98
Copy link
Member

Fixes the parsing of TRIM specification keywords- BOTH, LEADING, and TRAILING (fixes #316). This ensures they are no longer treated as string literals except when used as the first argument of a call to the TRIM function.

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

@alancai98 alancai98 self-assigned this Nov 13, 2020
@codecov-io
Copy link

codecov-io commented Nov 13, 2020

Codecov Report

Merging #326 (0de88ae) into master (8923144) will decrease coverage by 0.01%.
The diff coverage is 83.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #326      +/-   ##
============================================
- Coverage     82.37%   82.35%   -0.02%     
  Complexity     1233     1233              
============================================
  Files           157      157              
  Lines          9366     9365       -1     
  Branches       1526     1526              
============================================
- Hits           7715     7713       -2     
  Misses         1192     1192              
- Partials        459      460       +1     
Flag Coverage Δ Complexity Δ
CLI 18.11% <ø> (ø) 0.00 <ø> (ø)
EXAMPLES 76.01% <ø> (ø) 0.00 <ø> (ø)
LANG 85.00% <83.33%> (-0.02%) 0.00 <0.00> (ø)
PTS 100.00% <ø> (ø) 0.00 <ø> (ø)
TEST_SCRIPT 79.68% <ø> (ø) 0.00 <ø> (ø)

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

Impacted Files Coverage Δ Complexity Δ
lang/src/org/partiql/lang/syntax/LexerConstants.kt 100.00% <ø> (ø) 0.00 <0.00> (ø)
lang/src/org/partiql/lang/syntax/SqlLexer.kt 91.93% <ø> (-0.08%) 37.00 <0.00> (-1.00)
lang/src/org/partiql/lang/syntax/SqlParser.kt 80.42% <80.00%> (-0.04%) 231.00 <0.00> (+1.00) ⬇️
...org/partiql/lang/eval/builtins/TrimExprFunction.kt 81.25% <100.00%> (ø) 19.00 <0.00> (ø)

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 8923144...0de88ae. Read the comment docs.

@alancai98 alancai98 merged commit a22e529 into master Dec 8, 2020
@alancai98 alancai98 deleted the fix-trim-keywords branch December 8, 2020 18:13
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.

BOTH, LEADING and TRAILING are treated as string literals
4 participants