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

Resolve unreachable branch of Value::position #1012

Merged
merged 1 commit into from
Nov 19, 2022

Conversation

ever0de
Copy link
Member

@ever0de ever0de commented Nov 19, 2022

The unit test coverage is satisfied, but the error branch that did not appear in the user interface Glue::execute is corrected.

If it were not for this fix, the position function would probably be correct to receive a String rather than a Value.

@ever0de ever0de added the improvement Improvements for existing features label Nov 19, 2022
@ever0de ever0de requested review from panarch and devgony November 19, 2022 06:04
@ever0de ever0de self-assigned this Nov 19, 2022
@@ -25,7 +28,11 @@ test_case!(position, async move {
),
(
"SELECT POSITION(1 IN 'cheese') AS test",
Err(EvaluateError::FunctionRequiresStringValue(String::from("POSITION")).into()),
Err(ValueError::UnSupportedValueByPositionFunction {
Copy link
Member

Choose a reason for hiding this comment

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

nit. Unsupported would be good.

@coveralls
Copy link

coveralls commented Nov 19, 2022

Pull Request Test Coverage Report for Build 3502363132

  • 19 of 19 (100.0%) changed or added relevant lines in 5 files are covered.
  • 21 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.02%) to 98.369%

Files with Coverage Reduction New Missed Lines %
core/src/executor/aggregate/mod.rs 2 81.82%
test-suite/src/tester/mod.rs 19 87.5%
Totals Coverage Status
Change from base Build 3489369541: -0.02%
Covered Lines: 39571
Relevant Lines: 40227

💛 - Coveralls

@ever0de ever0de force-pushed the fix-unreachable-branch branch from d602daf to 0b8b710 Compare November 19, 2022 06:17
Copy link
Member

@panarch panarch left a comment

Choose a reason for hiding this comment

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

This is a nice improvement! Thanks a lot @ever0de

@panarch panarch merged commit 4d3c3be into gluesql:main Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvements for existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants