delta-io / delta

An open-source storage framework that enables building a Lakehouse architecture with compute engines including Spark, PrestoDB, Flink, Trino, and Hive and APIs
https://delta.io
Apache License 2.0
7.62k stars 1.71k forks source link

[Spark] Remove use of current_date in MERGE test #3860

Closed johanl-db closed 1 week ago

johanl-db commented 1 week ago

Description

Fix flaky test that very rarely fail with actual result being off by one day compared to the expected result.

Turns out it calls current_date() separately to compute the input data and the expected result.

How was this patch tested?

~Run the test around midnight~ (as a thought experiment)