sqlmesh icon indicating copy to clipboard operation
sqlmesh copied to clipboard

CI Fix - Clickhouse Failing Sometimes

Open cmgoffena13 opened this issue 3 months ago • 0 comments

Link: https://github.com/SQLMesh/sqlmesh/actions/runs/32190188666/job/95882655785

AI Notes

Failing Test tests/core/engine_adapter/integrationtest_integration_clickhouse.py::test_insert_overwrite_by_condition_by_key_partitioned[[query]clickhouse_cluster]

What’s Wrong After a unique-key insert overwrite, id=4 should be 2024-05-01 but the table has 2024-05-02. The assert also looks totally broken because ClickHouse returns dates as unix seconds and the test expects pandas nanoseconds, so every row looks wrong even when most dates match.

Possible Fix Make the unique-key path pick a deterministic row for duplicates (e.g. ordered), and/or normalize date comparison in compare_with_current so ClickHouse dates compare as real dates, not raw ints.

cmgoffena13 avatar Aug 21 '26 22:08 cmgoffena13