spark-fast-tests
spark-fast-tests copied to clipboard
Question: Verification of Timestamp Values
I was considering bringing PowerMock together with spark-fast-tests to provide the ability to verify column transformations involving the system clock (ex: current_timestamp()). This seems like a pretty common use case though, so I figured I'd check in with the community first.
Has anybody had any luck testing functionality that deals with the system clock, which to my understanding is sealed within the Apache Spark framework?
I have had some success, but the comparison functions seem to want to convert Timestamps to local during comparison, so things can get odd. As far as spark is concerned, you can set the timezone that spark uses in the session, which helps with things like current_timestamp().