예제 #1
0
파일: DataSet.py 프로젝트: chiwanpark/flink
    def using(self, operator):
        """
        Finalizes a Cross transformation.

        Applies a CrossFunction to each pair of joined elements. Each CrossFunction call returns exactly one element.

        :param operator:The CrossFunction 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 = CrossFunction()
            operator.cross = f
        self._info.operator = operator
        self._info.types = _createArrayTypeInfo()
        self._info.name = "PythonCross"
        self._info.uses_udf = True
        return OperatorSet(self._env, self._info)
예제 #2
0
파일: DataSet.py 프로젝트: tarunnar/pyflink
    def using(self, operator):
        """
        Finalizes a Cross transformation.

        Applies a CrossFunction to each pair of joined elements. Each CrossFunction call returns exactly one element.

        :param operator:The CrossFunction 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 = CrossFunction()
            operator.cross = f
        self._info.operator = operator
        self._info.types = _createArrayTypeInfo()
        self._info.name = "PythonCross"
        self._info.uses_udf = True
        return OperatorSet(self._env, self._info)
예제 #3
0
    def using(self, operator, types):
        """
        Finalizes a Cross transformation.

        Applies a CrossFunction to each pair of joined elements. Each CrossFunction call returns exactly one element.

        :param operator:The CrossFunction that is called for each pair of joined elements.
        :param types: The type of the resulting DataSet.
        :return:An Set that represents the joined result DataSet.
        """
        if isinstance(operator, TYPES.FunctionType):
            f = operator
            operator = CrossFunction()
            operator.cross = 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] = "PythonCross"
        return OperatorSet(self._env, self._info, copy_set=True)
예제 #4
0
    def using(self, operator, types):
        """
        Finalizes a Cross transformation.

        Applies a CrossFunction to each pair of joined elements. Each CrossFunction call returns exactly one element.

        :param operator:The CrossFunction that is called for each pair of joined elements.
        :param types: The type of the resulting DataSet.
        :return:An Set that represents the joined result DataSet.
        """
        if isinstance(operator, TYPES.FunctionType):
            f = operator
            operator = CrossFunction()
            operator.cross = f
        self._info.operator = operator
        self._info.meta = str(inspect.getmodule(operator)) + "|" + str(
            operator.__class__.__name__)
        self._info.types = types
        self._info.name = "PythonCross"
        return OperatorSet(self._env, self._info)