Describe the bug
Hi all, I think I've found a case which violates the LATENESS contract. An as-of lookup written as an inequality join plus ARG_MAX silently drops an output row when LATENESS is declared on the timestamp columns.
This is not causing me pain; I can use the ASOF JOIN for my usecase. But I found it during some testing and thought I'd flag it. You guys rock! 🪨 ❤️
This PR contains a minimal repro where the LATENESS contract is not violated by inputs but outputs are different than an identical SQL with LATENESS omitted.
Related issues/links from my agent:
Describe the bug
Hi all, I think I've found a case which violates the LATENESS contract. An as-of lookup written as an inequality join plus
ARG_MAXsilently drops an output row whenLATENESSis declared on the timestamp columns.This is not causing me pain; I can use the ASOF JOIN for my usecase. But I found it during some testing and thought I'd flag it. You guys rock! 🪨 ❤️
This PR contains a minimal repro where the
LATENESScontract is not violated by inputs but outputs are different than an identical SQL withLATENESSomitted.Related issues/links from my agent:
feldera/feldera#6690[SQL] Output of input_map_with_waterline should not be GC-ed using retain_values #6690 /feldera/feldera#6693[SQL] GC of tables with keys and LATENESS should never use retain_values, but can use retain_keys when keys have LATENESS #6693(fix merged 2026-07-27, already in the pinned commit): upstream established thatintegrate_trace_retain_valuesfor LATENESS GC is unsound because it "could delete keys that should be permanently frozen," and switched theinput_map_with_waterline/PRIMARY KEYpath tointegrate_trace_retain_keys. This report is the same root cause in an uncovered codepath (the history join input of an inequality-join +ARG_MAXplan).feldera/feldera#4631[SQL] GC output ofinput_map_with_waterline#4631 (merged 2025-08-26): introduced theretain_valueswaterline GC later flagged as unsound.