def using(self, operator): """ Finalizes a Join transformation. Applies a JoinFunction to each pair of joined elements. Each JoinFunction call returns exactly one element. :param operator:The JoinFunction that is called for each pair of joined elements. :return:An Set that represents the joined result DataSet. """ if isinstance(operator, TYPES.FunctionType): f = operator operator = JoinFunction() operator.join = f self._info.operator = operator self._info.types = _createArrayTypeInfo() self._info.name = "PythonJoin" self._info.uses_udf = True return OperatorSet(self._env, self._info)
def using(self, operator, types): """ Finalizes a Join transformation. Applies a JoinFunction to each pair of joined elements. Each JoinFunction call returns exactly one element. :param operator:The JoinFunction that is called for each pair of joined elements. :param types: :return:An Set that represents the joined result DataSet. """ if isinstance(operator, TYPES.FunctionType): f = operator operator = JoinFunction() operator.join = f self._info[_Fields.OPERATOR] = operator self._info[_Fields.META] = str(inspect.getmodule(operator)) + "|" + str(operator.__class__.__name__) self._info[_Fields.TYPES] = types self._info[_Fields.NAME] = "PythonJoin" self._env._sets.append(self._info) return OperatorSet(self._env, self._info, copy_set=True)
def using(self, operator, types): """ Finalizes a Join transformation. Applies a JoinFunction to each pair of joined elements. Each JoinFunction call returns exactly one element. :param operator:The JoinFunction that is called for each pair of joined elements. :param types: :return:An Set that represents the joined result DataSet. """ if isinstance(operator, TYPES.FunctionType): f = operator operator = JoinFunction() operator.join = f self._info[_Fields.OPERATOR] = operator self._info[_Fields.META] = str( inspect.getmodule(operator)) + "|" + str( operator.__class__.__name__) self._info[_Fields.TYPES] = types self._info[_Fields.NAME] = "PythonJoin" self._env._sets.append(self._info) return OperatorSet(self._env, self._info, copy_set=True)