-
Notifications
You must be signed in to change notification settings - Fork 9
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
Mask out results before comparing #79
Comments
This sounds like a good idea, and would make tests like the ones in CALCITE-6021 more direct. The only question I have is how we could ensure things like timezones correctly meet expectations? Granted that the current tests don't do this either.. Maybe we could do something to check whether two tests have the appropriate amount of time between them? For instance:
|
Quidem's sweet spot is always going to be things that you can check using simple comparisons (think grep, diff, sed regular expressions). If you need a Turing-complete programming language to check the assertions, Quidem will be out of its league. You could of course do |
Another area we should expand in Quidem is running queries with particular session parameters, e.g. set time zone to Pacific time. But that should be a different issue. |
It would be useful if Quidem had a way to mask out results. For example, the following test (from CALCITE-6021) calls the
CURRENT_DATETIME
function, which returns a value that has a particular format but is different every time:The test would succeed because '2016-05-19T10:38:47.046465' and '2023-11-11T16:38:47.012345' would both be converted to 'xxxx-xx-xxTxx:xx:xx.xxxxxx'.
The 6 means 'the next 6 lines'. The next argument is a Java regex. The following argument is a Java replacement string. As usual in Java regex, you can include '^' and '$' in the regex if you want to match the whole string.
The text was updated successfully, but these errors were encountered: