Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-4246

Wrong results from real-time streaming when an optional field is used as a dimension

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: v3.0.0-alpha
    • Fix Version/s: v3.0.0
    • Component/s: Real-time Streaming
    • Labels:
      None

      Description

      We run into an issue which seems to be related to the real-time streaming receiver.

      We have an optional field in the kafka messages, that is, in some cases it has a value, in other cases it is missing from the JSON message. This field is defined as a dimension and is used in the queries. We were assuming that when this field is missing from the JSON message, its value will be interpreted as null (as is the case with the Kylin batch engine).

      The results for queries that include this field are correct for those segments that have been rebuilt with the Kylin batch engine, but incorrect when they are built by the streaming receiver.

      E.g. in the example query below (simplified version of our actual queries), optional_field is an optional field, and mandatory_field always has a value. In our case, the below query should produce 0 as output, because we have no such records where optional_field has a value (is not null), and mandatory_field='X'. Still, for those segments that are coming from the streaming receiver, we get non-0 values.

      select count( * )
      from movement_events
      where mandatory_field='X'
      and optional_field is not null;

      Is this a known issue? Can we avoid this somehow, without changing the source events?

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hit_lacus Xiaoxiang Yu
                Reporter:
                ainagy Andras Istvan Nagy
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: