[
https://issues.apache.org/jira/browse/CRUNCH-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13902503#comment-13902503
]
Gabriel Reid commented on CRUNCH-216:
-------------------------------------
I'm still regularly kicking myself for neglecting to get this into the 0.7
release, but I've got an idea on how we could get this in without breaking
backwards compatibility in the short-term.
What I was thinking was to add a few factory methods to MapsideJoinStrategy,
i.e.
{code}
/**
* Both of these factory methods create a MapsideJoinStrategy where the
* left-most PTable should be the smaller of the two
*/
public static MapsideJoinStrategy MapsideJoinStrategy.create() { ... }
public static MapsideJoinStrategy MapsideJoinStrategy.create(boolean
materialize) { ... }
/**
* Creates a MapsideJoinStrategy where the smaller PTable should be on the
right side.
* Could use a better name.
*/
@Deprecated
public static MapsideJoinStrategy
MapsideJoinStrategy.createBackwardsCompatibleStrategy(boolean materialize) {
... }
{code}
and then also annotate the two existing constructors as deprecated, with the
intention of removing the deprecated constructors and factory methods in a few
releases from now.
I'm thinking that this would give a pretty easy migration path, avoid any
unpleasant surprises with a changing API, and allow us to align the API of all
the JoinStrategy implementations.
Any thoughts on this approach?
> Transpose arguments in MapsideJoinStrategy.join
> -----------------------------------------------
>
> Key: CRUNCH-216
> URL: https://issues.apache.org/jira/browse/CRUNCH-216
> Project: Crunch
> Issue Type: Improvement
> Reporter: Gabriel Reid
>
> The MapsideJoinStrategy currently specifies that the smaller table in the
> join (i.e. the table to be replicated and loaded in memory) should be on the
> right-hand side of the join.
> This is the opposite of what is done in all other join strategies, making it
> impossible to just switch out another join strategy for a
> MapsideJoinStrategy. The MapsideJoinStrategy could be brought in line with
> the other JoinStrategies to expect the smaller of two tables to be provided
> as the left-side table.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)