Uploaded image for project: 'Samza'
  1. Samza
  2. SAMZA-2552

Samza SQL Filter operator logging false posivte error message on each record.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • sql
    • None

    Description

      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.

       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"));
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            bslim Slim Bouguerra
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h