Skip to content
Browse files
[FLINK-27776][python] Throw meaningful exceptions when UDAF doesn't o…
…verride method 'merge' is used in cases where 'merge' is used

This closes #19817.
  • Loading branch information
HuangXingBo authored and dianfu committed May 26, 2022
1 parent 1348dee commit 51eb02e92287eff3493d4c999390d1d525f3f9d7
Showing 1 changed file with 4 additions and 4 deletions.
@@ -164,7 +164,7 @@ def retract(self, accumulator: ACC, *args):
:param accumulator: the accumulator which contains the current aggregated results
:param args: the input value (usually obtained from new arrived data).
raise RuntimeError("Method retract is not implemented")

def merge(self, accumulator: ACC, accumulators):
@@ -178,7 +178,7 @@ def merge(self, accumulator: ACC, accumulators):
custom merge method.
:param accumulators: a group of accumulators that will be merged.
raise RuntimeError("Method merge is not implemented")

def get_result_type(self) -> DataType:
@@ -187,7 +187,7 @@ def get_result_type(self) -> DataType:
:return: The :class:`~pyflink.table.types.DataType` of the AggregateFunction's result.
raise RuntimeError("Method get_result_type is not implemented")

def get_accumulator_type(self) -> DataType:
@@ -196,7 +196,7 @@ def get_accumulator_type(self) -> DataType:
:return: The :class:`~pyflink.table.types.DataType` of the AggregateFunction's accumulator.
raise RuntimeError("Method get_accumulator_type is not implemented")

class AggregateFunction(ImperativeAggregateFunction):

0 comments on commit 51eb02e

Please sign in to comment.