Skip to content

LATENESS violation in as-of-like inequality join + arg_max #6829

Description

@bens-secret-alt-account

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:

Metadata

Metadata

Assignees

Labels

SQL compilerRelated to the SQL compilercritical priorityCritical issues that need immediate attention

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions