You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Slim Bouguerra (Jira)" <ji...@apache.org> on 2020/06/20 03:58:00 UTC

[jira] [Created] (SAMZA-2552) Samza SQL Filter operator logging false posivte error message on each record.

Slim Bouguerra created SAMZA-2552:
-------------------------------------

             Summary: Samza SQL Filter operator logging false posivte error message on each record.
                 Key: SAMZA-2552
                 URL: https://issues.apache.org/jira/browse/SAMZA-2552
             Project: Samza
          Issue Type: Improvement
          Components: sql
            Reporter: Slim Bouguerra


Filter operator logs an error message with every record every time the return type of the expression evaluation is not a Boolean Java Object.

This is broken for cases where the filter is applied on null values and the return object is null.

This will lead to wrong false positive error log on each record for no reason.

example of the expression filter.
{code:java}
 public void execute(org.apache.samza.sql.data.SamzaSqlExecutionContext sqlContext, org.apache.samza.context.Context context, final org.apache.calcite.DataContext root, Object[] inputValues, Object[] outputValues) {
  final String inp1_ = inputValues[1] == null ? (String) null : inputValues[1].toString();
  outputValues[0] = inp1_ == null ? (Boolean) null : Boolean.valueOf(org.apache.calcite.runtime.SqlFunctions.ne(inp1_, "string"));
}
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)