Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
The underlying reason is that a previous PR introduced a test with state TTL as follows in the SQL:
.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")
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.
Attachments
Issue Links
- is caused by
-
FLINK-34053 Support state TTL hint for group aggregate
- Closed
- links to