-
Notifications
You must be signed in to change notification settings - Fork 607
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
Add unit tests for EvaluateExpr in VIEWs #1488
Conversation
}; | ||
const auto viewResults = executeTwice(selectFromViewQuery); | ||
const auto etalonResults = executeTwice(timeQuery); | ||
UNIT_ASSERT_EQUAL_C(viewResults[0] < viewResults[1], etalonResults[0] < etalonResults[1], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be counter-intuitive, but etalonResult[0] is equal to etalonResult[1] at the moment of writing this unit test. @gridnevvvit confirmed that this behaviour is somewhat expected.
⚪
|
⚪
|
KIKIMR-20819
Concerns were expressed that EvaluateExpr might behave differently if written inside VIEWs. The prime suspicion was that queries selecting from views would be loaded from the node's query cache and the result of the following query:
would always be the same.
However, this suspicion turned out to be wrong. No code changes were necessary to ensure the same behaviour of EvaluateExpr written (1) in a view and (2) in a SELECT statement. This PR only adds unit tests.