Skip to content

Fix: Make date range inclusive for audits ran in sqlmesh plan#4179

Merged
VaggelisD merged 1 commit intomainfrom
vaggelisd/audit_plan_dates
Apr 18, 2025
Merged

Fix: Make date range inclusive for audits ran in sqlmesh plan#4179
VaggelisD merged 1 commit intomainfrom
vaggelisd/audit_plan_dates

Conversation

@VaggelisD
Copy link
Copy Markdown
Collaborator

Fixes #3966

Internally, start & end dates are converted to exclusive range to accommodate the interval logic and are transformed back to inclusive during render / evaluation.

The issue is apparent during plan because:

  • When running sqlmesh plan --start <date> --end <date>, we apply the missing interval logic and propagate the exclusive range to render_audit_query; We then create the BETWEEN filter manually without converting the range back to inclusive, as is the case in all other render calls

  • When running sqlmesh audit --start <date> --end <date>, the dates are propagated as-is

@VaggelisD VaggelisD requested a review from a team April 18, 2025 16:29
@VaggelisD VaggelisD merged commit c13c40f into main Apr 18, 2025
22 checks passed
@VaggelisD VaggelisD deleted the vaggelisd/audit_plan_dates branch April 18, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

audit dates are wrongly interpolated in plan

3 participants