コード例 #1
0
ファイル: DataSet.py プロジェクト: chiwanpark/flink
    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)
コード例 #2
0
    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)
コード例 #3
0
ファイル: DataSet.py プロジェクト: chenghao-intel/flink
    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)
コード例 #4
0
    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.operator = operator
        self._info.meta = str(inspect.getmodule(operator)) + "|" + str(
            operator.__class__.__name__)
        self._info.types = types
        self._info.name = "PythonJoin"
        self._env._sets.append(self._info)
        return OperatorSet(self._env, self._info)