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

Make aliases created in compute() transformation visible for following transforms/query options #1369

Merged
merged 4 commits into from
Jan 16, 2019

Conversation

kosinsky
Copy link
Contributor

@kosinsky kosinsky commented Jan 2, 2019

Issues

*This pull request fixes issue #1368 * also adds a few tests for ApplyBinder (it wasn't covered in original implementation)

Description

Collecting aliases generated in compute() transformation to make them visible for following transformations and/or query options ($orderby, $filter)

Checklist (Uncheck if it is not completed)

  • Test cases added
  • Build and test with one-click build and test script passed

token.Kind.ShouldBeEquivalentTo(QueryTokenKind.Compute);
List<ComputeExpressionToken> tokens = token.Expressions.ToList();
tokens.Count.Should().Be(3);
tokens[0].Kind.ShouldBeEquivalentTo(QueryTokenKind.ComputeExpression);
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it's more clear to create a private method to verify # 1, # 2, # 3 separately.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have test ParseComputeWithMathematicalOperations that checks $compute for that case. I'm adding the same for compute()

@xuzhg xuzhg added the Ready for review Use this label if a pull request is ready to be reviewed label Jan 7, 2019
Copy link
Member

@mikepizzo mikepizzo left a comment

Choose a reason for hiding this comment

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

:shipit:

@mikepizzo mikepizzo merged commit d2cf9d9 into OData:master Jan 16, 2019
xuzhg pushed a commit to xuzhg/odata.net that referenced this pull request Feb 14, 2019
…g transforms/query options (OData#1369)

* Ensure that we can use aliases genearted in compute on later stages

* Ensure that we can use aliases genearted in compute on later stages

* Extra tests for compute

* Code alignment
xuzhg pushed a commit that referenced this pull request Feb 14, 2019
…g transforms/query options (#1369)

* Ensure that we can use aliases genearted in compute on later stages

* Ensure that we can use aliases genearted in compute on later stages

* Extra tests for compute

* Code alignment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for review Use this label if a pull request is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants