Merged
Conversation
Enables joins where the right-hand side is a lookup. Includes an integration test. Also, includes changes to LookupExtractorFactoryContainerProvider: 1) Add "getAllLookupNames", which will be needed to eventually connect lookups to Druid's SQL catalog. 2) Convert "get" from nullable to Optional return. 3) Swap out most usages of LookupReferencesManager in favor of the simpler LookupExtractorFactoryContainerProvider interface.
suneet-s
approved these changes
Jan 30, 2020
ccaominh
approved these changes
Jan 30, 2020
| Map<Class<? extends DataSource>, JoinableFactory> joinableFactories = | ||
| injector.getInstance(Key.get(new TypeLiteral<Map<Class<? extends DataSource>, JoinableFactory>>() {})); | ||
| Assert.assertEquals(1, joinableFactories.size()); | ||
| Assert.assertEquals(2, joinableFactories.size()); |
Contributor
There was a problem hiding this comment.
Do you want to add a similar assert below for LookupJoinableFactory?
Contributor
Author
There was a problem hiding this comment.
Sure, that sounds good, I'll add one in a followup.
| Map<Class<? extends DataSource>, JoinableFactory> joinableFactories = | ||
| injector.getInstance(Key.get(new TypeLiteral<Map<Class<? extends DataSource>, JoinableFactory>>() {})); | ||
| Assert.assertEquals(2, joinableFactories.size()); | ||
| Assert.assertEquals(3, joinableFactories.size()); |
Contributor
There was a problem hiding this comment.
Maybe JoinableFactoryModule.FACTORY_MAPPINGS can be made visible for testing so that this can be changed to FACTORY_MAPPINGS.size() + 1 and the test does not need to updated again if another default mapping is added later.
Contributor
Author
There was a problem hiding this comment.
Sounds reasonable, I'll add that in the same followup.
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enables joins where the right-hand side is a lookup. Includes an
integration test.
Also, includes changes to LookupExtractorFactoryContainerProvider:
lookups to Druid's SQL catalog.
simpler LookupExtractorFactoryContainerProvider interface.