Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-9419

UNION should not be treated as retraction producing operator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Table SQL / API
    • None

    Description

      The following query fails

      SELECT
          user_id,
          count(msg),
          HOP_END(rowtime, INTERVAL '1' second, INTERVAL '1' minute)
      FROM (SELECT rowtime, user_id, action_name AS msg FROM
                event_client_action
              WHERE /* various clauses */
              UNION SELECT rowtime, user_id, action_type AS msg FROM
                 event_server_action
                 WHERE /* various clauses */
            )
      GROUP BY
      HOP(rowtime, INTERVAL '1' second, INTERVAL '1' minute), user_id
      

      with

      Retraction on windowed GroupBy aggregation is not supported yet. Note: Windowed GroupBy aggregation should not follow a non-windowed GroupBy aggregation.

      The problem is that the UNION operator is translated into a UNION ALL and a subsequent GROUP BY on all attributes without an aggregation function. Currently, all GROUP BY operators are treated as retraction-producing operators. However, this is only true for grouping operators with aggregation functions. If the operator groups on all attributes and has no aggregation functions, it does not produce retractions but only forwards them (similar to a filter operator).

      Attachments

        Issue Links

          Activity

            People

              hequn8128 Hequn Cheng
              fhueske Fabian Hueske
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: