----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/43062/ -----------------------------------------------------------
Review request for geode, anilkumar gingade, Barry Oglesby, Dan Smith, and xiaojian zhou. Repository: geode Description ------- When executing a join query with additional filters on a single region, we now detect this scenario and instead of creating a CompositeGroupJunction, we create a regular GroupJunction. When we being cutdown and expansion, we then create new compiled comparisons so that we can do an index lookup. For example "select * from /region1 a, /region2 b where a.name = "joe" and a.id = b.id" We will now execute the a.name first assuming an index is present on a.name During cutdown and expand, we determine that the comparison a.id = b.id can create a new compiled comparison (derived join) because the alias a from a.id matches our original filter a.name. We can evaluate a.id at this point, say id evaluated to 8. So we create a compiled comparison of b.id = 8. We can now do a lookup using the index on b.id. We retrieve these results and place them into a map. This map will be used to continue to derive additional joins if they exist. Such as b.id = c.id, etc... We can continue with the iteration but instead of iterating the entire b region, we can now iterate over the results of the derived join. This also includes a fix to not unlock an index lock when reevaluating an inner query. Diffs ----- gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CompiledComparison.java 75eaaad gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CompiledJunction.java 6bc68de gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CompiledSelect.java 205acaa gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/DerivedInfo.java PRE-CREATION gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/GroupJunction.java 37c13f2 gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/QueryUtils.java 91e20f0 gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexManager.java 534f757 gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/EquijoinDUnitTest.java PRE-CREATION gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PartitionedRegionEquijoinDUnitTest.java PRE-CREATION Diff: https://reviews.apache.org/r/43062/diff/ Testing ------- Thanks, Jason Huynh
