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

xuyang commented on FLINK-34271:
--------------------------------

BTW, I've noticed that the old tests for json plan changes (diff the json plan 
on a PR) are about to be completely removed due to FLINK-33421, but it seems 
that testing to check if the json plan has been affected by modifications from 
a PR is still necessary. This is because the new RestoreTestBase testing 
framework does not assess the risk of json plan modifications.

In the meantime, if some of the tests in RestoreTestBase fail due to explicit 
json plan incompatibility changes, is it possible to directly modify the 
failing tests in RestoreTestBase (by regenerating json plans and recreating 
savepoint metadata)?

> Fix the unstable test about GroupAggregateRestoreTest#AGG_WITH_STATE_TTL_HINT
> -----------------------------------------------------------------------------
>
>                 Key: FLINK-34271
>                 URL: https://issues.apache.org/jira/browse/FLINK-34271
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>            Reporter: xuyang
>            Assignee: xuyang
>            Priority: Major
>
> The underlying reason is that a previous PR introduced a test with state TTL 
> as follows in the SQL: 
> {code:java}
> .runSql(
>         "INSERT INTO sink_t SELECT /*+ STATE_TTL('source_t' = '4d') */"
>                 + "b, "
>                 + "COUNT(*) AS cnt, "
>                 + "AVG(a) FILTER (WHERE a > 1) AS avg_a, "
>                 + "MIN(c) AS min_c "
>                 + "FROM source_t GROUP BY b"){code}
> When the savepoint metadata was generated for the first time, the metadata 
> recorded the time when a certain key was accessed. If the test is rerun after 
> the TTL has expired, the state of this key in the metadata will be cleared, 
> resulting in an incorrect test outcome.
> To rectify this issue, I think the current tests in RestoreTestBase could be 
> modified to regenerate a new savepoint metadata as needed every time. 
> However, this seems to deviate from the original design purpose of 
> RestoreTestBase.
> For my test, I will work around this by removing the data 
> "consumedBeforeRestore", as I am only interested in testing the generation of 
> an expected JSON plan.



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

Reply via email to