Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Verification of Timestamp Values #98

Open
KevinMellott91 opened this issue Jul 28, 2021 · 1 comment
Open

Question: Verification of Timestamp Values #98

KevinMellott91 opened this issue Jul 28, 2021 · 1 comment

Comments

@KevinMellott91
Copy link

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?

@mikenac
Copy link

mikenac commented May 17, 2022

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().

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

No branches or pull requests

2 participants