[ 
https://issues.apache.org/jira/browse/FLINK-32785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17757777#comment-17757777
 ] 

Jane Chan edited comment on FLINK-32785 at 8/31/23 3:09 AM:
------------------------------------------------------------

This ticket aims to verify FLINK-31791: Enhance COMPILED PLAN to support 
operator-level state TTL configuration.

More details about this feature and how to use it can be found in this 
[documentation|https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/concepts/overview/#configure-operator-level-state-ttl].
 The verification steps are as follows.
h3. Part I: Functionality Verification

1. Start the standalone session cluster and sql client.

2. Execute the following DDL statements.
{code:sql}
CREATE TABLE `default_catalog`.`default_database`.`Orders` (
  `order_id` INT,
  `line_order_id` INT
) WITH (
  'connector' = 'datagen', 
  'rows-per-second' = '5'

); 

CREATE TABLE `default_catalog`.`default_database`.`LineOrders` (
  `line_order_id` INT,
  `ship_mode` STRING
) WITH (
  'connector' = 'datagen',
  'rows-per-second' = '5'
);

CREATE TABLE `default_catalog`.`default_database`.`OrdersShipInfo` (
  `order_id` INT,
  `line_order_id` INT,
  `ship_mode` STRING ) WITH (
  'connector' = 'print'
);
{code}
 
3. Generate Compiled Plan
{code:sql}
COMPILE PLAN '/path/to/plan.json' FOR
INSERT INTO OrdersShipInfo 
SELECT a.order_id, a.line_order_id, b.ship_mode 
FROM Orders a JOIN LineOrders b ON a.line_order_id = b.line_order_id;
{code}
 

4. Verify JSON plan content
The generated JSON file should contain the following "state" JSON array for 
StreamJoin ExecNode.
{code:json}
{
    "id" : 5,
    "type" : "stream-exec-join_1",
    "joinSpec" : {
      ...
    },
    "state" : [ {
      "index" : 0,
      "ttl" : "0 ms",
      "name" : "leftState"
    }, {
      "index" : 1,
      "ttl" : "0 ms",
      "name" : "rightState"
    } ],
    "inputProperties": [...],
    "outputType": ...,
    "description": ...
}
{code}
h3. Part II: Compatibility Verification

Repeat the previously described steps using the flink-1.17 release, and then 
execute the generated plan using 1.18 via
{code:sql}
EXECUTE PLAN '/path/to/plan-generated-by-old-flink-version.json'
{code}
 


was (Author: qingyue):
This ticket aims to verify FLINK-31791: Enhance COMPILED PLAN to support 
operator-level state TTL configuration.

More details about this feature and how to use it can be found in this 
[documentation|https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/concepts/overview/#configure-operator-level-state-ttl].
 The verification steps are as follows.
h3. Part I: Functionality Verification

1. Start the standalone session cluster and sql client.

2. Execute the following DDL statements.
{code:sql}
CREATE TABLE `default_catalog`.`default_database`.`Orders` (
  `order_id` INT,
  `line_order_id` INT
) WITH (
  'connector' = 'datagen'
); 

CREATE TABLE `default_catalog`.`default_database`.`LineOrders` (
  `line_order_id` INT,
  `ship_mode` STRING
) WITH (
  'connector' = 'datagen'
);

CREATE TABLE `default_catalog`.`default_database`.`OrdersShipInfo` (
  `order_id` INT,
  `line_order_id` INT,
  `ship_mode` STRING ) WITH (
  'connector' = 'print'
);
{code}
 
3. Generate Compiled Plan
{code:sql}
COMPILE PLAN '/path/to/plan.json' FOR
INSERT INTO OrdersShipInfo 
SELECT a.order_id, a.line_order_id, b.ship_mode 
FROM Orders a JOIN LineOrders b ON a.line_order_id = b.line_order_id;
{code}
 

4. Verify JSON plan content
The generated JSON file should contain the following "state" JSON array for 
StreamJoin ExecNode.
{code:json}
{
    "id" : 5,
    "type" : "stream-exec-join_1",
    "joinSpec" : {
      ...
    },
    "state" : [ {
      "index" : 0,
      "ttl" : "0 ms",
      "name" : "leftState"
    }, {
      "index" : 1,
      "ttl" : "0 ms",
      "name" : "rightState"
    } ],
    "inputProperties": [...],
    "outputType": ...,
    "description": ...
}
{code}
h3. Part II: Compatibility Verification

Repeat the previously described steps using the flink-1.17 release, and then 
execute the generated plan using 1.18 via
{code:sql}
EXECUTE PLAN '/path/to/plan-generated-by-old-flink-version.json'
{code}
 

> Release Testing: Verify FLIP-292: Enhance COMPILED PLAN to support 
> operator-level state TTL configuration
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-32785
>                 URL: https://issues.apache.org/jira/browse/FLINK-32785
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Tests
>    Affects Versions: 1.18.0
>            Reporter: Qingsheng Ren
>            Assignee: Sergey Nuyanzin
>            Priority: Major
>             Fix For: 1.18.0
>
>




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

Reply via email to