public class PythonFilterFunction extends AbstractPythonUDF<FilterFunction<org.python.core.PyObject>> implements FilterFunction<org.python.core.PyObject>
PythonFilterFunctionis a thin wrapper layer over a Python UDF
FilterFunction. It receives a
FilterFunctionas an input and keeps it internally in a serialized form. It is then delivered, as part of job graph, up to the TaskManager, then it is opened and becomes a sort of mediator to the Python UDF
This function is used internally by the Python thin wrapper layer over the streaming data functionality
|Constructor and Description|
|Modifier and Type||Method and Description|
The filter function that evaluates the predicate.
getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
public boolean filter(org.python.core.PyObject value) throws Exception
IMPORTANT: The system assumes that the function does not modify the elements on which the predicate is applied. Violating this assumption can lead to incorrect results.
value- The value to be filtered.
Exception- This method may throw exceptions. Throwing an exception will cause the operation to fail and may trigger recovery.
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.