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

Add test and modification to bestCandidate Calculation #765

Merged
merged 8 commits into from
Mar 19, 2021

Conversation

ryankwagner
Copy link
Collaborator

@ryankwagner ryankwagner commented Mar 9, 2021

Fixes:
#766

By adding the same if-else check made into the first half of this calculation, rollup inconsistent behavior is fixed.

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@@ -223,4 +223,99 @@ class QueryPipelineWithFallbackTest extends AnyFunSuite with Matchers with Befor
pipeline = builder._1.toOption.get.build()
assert(pipeline.fallbackQueryChainOption.isEmpty, s"No fallback query expected: $pipeline")
}

private[this] def aLessThanBByLevelAndCostAndCardinality(a: (String, Engine, Long, Int, Int), b: (String, Engine, Long, Int, Int)): Boolean = {
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of replicating code here, we can expose public wrapper method to test this comparator in the DefaultQueryPipelineFactory.

@pranavbhole pranavbhole merged commit 955c900 into yahoo:master Mar 19, 2021
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.

2 participants