Skip to content

Conversation

benesch
Copy link
Contributor

@benesch benesch commented Jun 10, 2019

This was extracted from #105. See individual commits for details.

@benesch benesch requested a review from nickolay June 10, 2019 15:36
@coveralls
Copy link

coveralls commented Jun 10, 2019

Pull Request Test Coverage Report for Build 337

  • 99 of 105 (94.29%) changed or added relevant lines in 4 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage remained the same at ?%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/sqlast/sql_operator.rs 19 22 86.36%
src/sqlparser.rs 20 23 86.96%
Files with Coverage Reduction New Missed Lines %
tests/sqlparser_common.rs 1 91.18%
Totals Coverage Status
Change from base Build 336: 0.0%
Covered Lines:
Relevant Lines: 0

💛 - Coveralls

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

Thanks @benesch

benesch added 2 commits June 10, 2019 23:02
These were previously called "BinaryExpr" and "Unary"; besides being
inconsistent, it's also not correct to say "binary expression" or "unary
expression", as it's the operators that have arities, not the
expression. Adjust the naming of the variants accordingly.
It is useful downstream to have two separate enums, one for unary
operators and one for binary operators, so that the compiler can check
exhaustiveness. Otherwise downstream consumers need to manually encode
which operators are unary and which operators are binary when matching
on an Operator enum.
@benesch benesch force-pushed the expr-consistency branch from b670e12 to ae25dce Compare June 11, 2019 03:03
@benesch
Copy link
Contributor Author

benesch commented Jun 11, 2019

Thanks for the review, @andygrove!

@benesch benesch merged commit f2fda57 into apache:master Jun 11, 2019
@benesch benesch deleted the expr-consistency branch June 11, 2019 03:08
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