Hi David,

Thanks for the inputs.

I did not choose to do so because of following currently identified reasons:

1. lib.util.FilterOperator is actually not an operator instead it is an
abstract class
 - Does not evaluate any expression/condition
 - Requires an concrete implementation and specifically of satisfiesFilter
function

2. No provision for false or error situations
 - This adds complications for the 'else' part of the DAG or logic
 - For downstream operators, there is no way to understand if there was an
error or it was false

On the other hand, I feel, if current FilterOperator abstract class is not
being widely used, we can think of phasing this out.

Regards,
Pradeep A. Dalvi

On Tue, May 10, 2016 at 1:20 AM, David Yan <[email protected]> wrote:

> Hi,
>
> It would be useful if you could state why the existing FilterOperator in
> Malhar does not satisfy your use case.
> The existing operator is at
> library/src/main/java/com/datatorrent/lib/util/FilterOperator.java.
>
> David
>
> On Sat, May 7, 2016 at 2:34 PM, Pradeep A. Dalvi <[email protected]> wrote:
>
> > Dear Folks,
> >
> > We are working on Filter Operator which will allow apex users to filter
> > (select/drop) tuples based on the certain condition from incoming stream.
> >
> >
> > Use case:
> >
> > -------------
> >
> > In many cases, not all tuples are of interest for the downstream
> operators.
> > In such cases, one may want select/filter out tuples to downstream. Also
> > one may want to process tuples which did not meet the
> condition/expression.
> >
> >
> > Functionality:
> >
> > -----------------
> >
> > 1. Filter operator shall receive POJO as input tuple and emit POJO on
> > either of output ports i.e. true and false. As the output ports' name
> > signify, when condition is met then the POJO shall be emitted on true
> port
> > and if condition is not met then that POJO shall be emitted on false
> port.
> >
> > 2. Operator needs condition/expression as a input param. This condition
> is
> > based on expression language support we already have in Malhar.
> >
> >
> > Please feel free to let me know your thoughts on this.
> >
> >
> > Thanks,
> >
> > --
> > Pradeep A. Dalvi
> >
>

Reply via email to