Matan Perelmuter
09/17/2024, 1:05 PMSELECT /*+ STATE_TTL('joined'='1s') */ *
FROM t1
INNER JOIN t2 FOR SYSTEM_TIME AS OF t1.proc_time AS joined ON t1.id = t2.id;
but when I try to add DISTINCT *
in the select I suddenly get:
org.apache.flink.table.api.ValidationException: The options of following hints cannot match the name of input tables or views:
`joined` in `STATE_TTL`
any idea why?D. Draco O'Brien
09/17/2024, 3:15 PMD. Draco O'Brien
09/17/2024, 3:17 PMD. Draco O'Brien
09/17/2024, 3:18 PMMatan Perelmuter
09/17/2024, 3:18 PMD. Draco O'Brien
09/17/2024, 3:19 PMD. Draco O'Brien
09/17/2024, 3:20 PMD. Draco O'Brien
09/17/2024, 3:20 PMD. Draco O'Brien
09/17/2024, 3:21 PMD. Draco O'Brien
09/17/2024, 3:22 PMD. Draco O'Brien
09/17/2024, 3:22 PMD. Draco O'Brien
09/17/2024, 3:23 PMD. Draco O'Brien
09/17/2024, 3:25 PMMatan Perelmuter
09/17/2024, 3:27 PMx
with ttl 1 hour.
Then I select distinct from that table, the distinct will always reflect the state of x
, if data stops arriving for an hour and the state is expired, both tables will be emptyD. Draco O'Brien
09/17/2024, 3:35 PMD. Draco O'Brien
09/17/2024, 3:38 PMMatan Perelmuter
09/17/2024, 3:39 PMD. Draco O'Brien
09/17/2024, 3:40 PMMatan Perelmuter
09/17/2024, 3:40 PMD. Draco O'Brien
09/17/2024, 3:41 PM