Github user srinathshankar commented on a diff in the pull request:
    --- Diff: python/pyspark/sql/ ---
    @@ -640,25 +640,24 @@ def join(self, other, on=None, how=None):
             if on is not None and not isinstance(on, list):
                 on = [on]
    -        if on is None or len(on) == 0:
    -            jdf = self._jdf.crossJoin(other._jdf)
    -        elif isinstance(on[0], basestring):
    -            if how is None:
    -                jdf = self._jdf.join(other._jdf, self._jseq(on), "inner")
    +        if on is not None:
    +            if isinstance(on[0], basestring):
    +                on = self._jseq(on)
    -                assert isinstance(how, basestring), "how should be 
    -                jdf = self._jdf.join(other._jdf, self._jseq(on), how)
    +                assert isinstance(on[0], Column), "on should be Column or 
list of Column"
    +                if len(on) > 1:
    +                    on = reduce(lambda x, y: x.__and__(y), on)
    --- End diff --
    Wouldn't reduce work even if len(on) == 1. i.e. do you need an if here ?

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to