[ 
https://issues.apache.org/jira/browse/FLINK-38998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Kononov updated FLINK-38998:
-----------------------------------
    Description: 
Hi!

The following SQL query with a cascaded tumbling window aggregate in the 
streaming mode  doesn't produce data if offset parameter of window TVF is 
specified:
{noformat}
CREATE TABLE source_table (
  dim STRING,
  user_id BIGINT,
  price BIGINT,
  row_time TIMESTAMP(3),
  WATERMARK FOR row_time AS row_time-INTERVAL '1' SECONDS
) WITH (
  'connector' = 'datagen',
  'rows-per-second' = '5'
);

CREATE TABLE sink_table (
    dim STRING,
    uv BIGINT,
    window_start TIMESTAMP(3),
    window_end TIMESTAMP(3)
) WITH ('connector' = 'print');

INSERT INTO
    sink_table
SELECT
    dim,
    COUNT(*) as uv,
    window_start,
    window_end
FROM
    (
        SELECT
            dim,
            user_id,
            window_start,
            window_end
        FROM
            TABLE(
                    TUMBLE(
                        TABLE source_table,
                            DESCRIPTOR(row_time),
                            INTERVAL '10' SECONDS,
                            INTERVAL '5' SECONDS
                    )
            )
        GROUP BY
            dim,
            user_id,
            window_start,
            window_end
    )
GROUP BY
    dim,
    window_start,
    window_end;{noformat}
!cascaded_window_agg_job_webui.png|width=882,height=428!

The behavior is the same for hop and cumulate windows with offsets.

The bug is tracked down to FLINK-21305 and Flink version 1.13.

I have a fix for the issue. Please, assign it to me.

 

Best regards,

Sergey

  was:
Hi!

The following SQL query with a cascaded tumbling window aggregate in the 
streaming mode  doesn't produce data if offset parameter of window TVF is 
specified:
{noformat}
CREATE TABLE source_table (
  dim STRING,
  user_id BIGINT,
  price BIGINT,
  row_time TIMESTAMP(3),
  WATERMARK FOR row_time AS row_time-INTERVAL '1' SECONDS
) WITH (
  'connector' = 'datagen',
  'rows-per-second' = '5'
);

CREATE TABLE sink_table (
    dim STRING,
    uv BIGINT,
    window_start TIMESTAMP(3),
    window_end TIMESTAMP(3)
) WITH ('connector' = 'print');

INSERT INTO
    sink_table
SELECT
    dim,
    COUNT(*) as uv,
    window_start,
    window_end
FROM
    (
        SELECT
            dim,
            user_id,
            window_start,
            window_end
        FROM
            TABLE(
                    TUMBLE(
                        TABLE source_table,
                            DESCRIPTOR(row_time),
                            INTERVAL '10' SECONDS,
                            INTERVAL '5' SECONDS
                    )
            )
        GROUP BY
            dim,
            user_id,
            window_start,
            window_end
    )
GROUP BY
    dim,
    window_start,
    window_end;{noformat}
!cascaded_window_agg_job_webui.png|width=721,height=350!

The behavior is the same for hop and cumulate windows with offsets.

The bug is tracked down to FLINK-21305 and Flink version 1.13.

I have a fix for the issue. Please, assign it to me.

 

Best regards,

Sergey


> Cascaded event time Window Aggregate does not produce data when offset is 
> specified
> -----------------------------------------------------------------------------------
>
>                 Key: FLINK-38998
>                 URL: https://issues.apache.org/jira/browse/FLINK-38998
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Runtime
>    Affects Versions: 2.2.0
>            Reporter: Sergey Kononov
>            Priority: Major
>         Attachments: cascaded_window_agg_job_webui.png
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Hi!
> The following SQL query with a cascaded tumbling window aggregate in the 
> streaming mode  doesn't produce data if offset parameter of window TVF is 
> specified:
> {noformat}
> CREATE TABLE source_table (
>   dim STRING,
>   user_id BIGINT,
>   price BIGINT,
>   row_time TIMESTAMP(3),
>   WATERMARK FOR row_time AS row_time-INTERVAL '1' SECONDS
> ) WITH (
>   'connector' = 'datagen',
>   'rows-per-second' = '5'
> );
> CREATE TABLE sink_table (
>     dim STRING,
>     uv BIGINT,
>     window_start TIMESTAMP(3),
>     window_end TIMESTAMP(3)
> ) WITH ('connector' = 'print');
> INSERT INTO
>     sink_table
> SELECT
>     dim,
>     COUNT(*) as uv,
>     window_start,
>     window_end
> FROM
>     (
>         SELECT
>             dim,
>             user_id,
>             window_start,
>             window_end
>         FROM
>             TABLE(
>                     TUMBLE(
>                         TABLE source_table,
>                             DESCRIPTOR(row_time),
>                             INTERVAL '10' SECONDS,
>                             INTERVAL '5' SECONDS
>                     )
>             )
>         GROUP BY
>             dim,
>             user_id,
>             window_start,
>             window_end
>     )
> GROUP BY
>     dim,
>     window_start,
>     window_end;{noformat}
> !cascaded_window_agg_job_webui.png|width=882,height=428!
> The behavior is the same for hop and cumulate windows with offsets.
> The bug is tracked down to FLINK-21305 and Flink version 1.13.
> I have a fix for the issue. Please, assign it to me.
>  
> Best regards,
> Sergey



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to