-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Source rowcount generic test #3279
Source rowcount generic test #3279
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love it!
fyi @Hosuke
- equal_rowcount_with_sources: | ||
evt_sources: | ||
- source('foundation_ethereum','market_evt_ReserveAuctionFinalized') | ||
- source('foundation_ethereum','market_evt_BuyPriceAccepted') | ||
- source('foundation_ethereum','market_evt_OfferAccepted') | ||
- source('foundation_ethereum','market_evt_PrivateSaleFinalized') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, so this part can test the sum of events from multiple event sources.
select count_a, count_b, (count_a - count_b) as diff_count | ||
from model_count | ||
full outer join sources_count | ||
on 1=1 | ||
) | ||
|
||
select * from unit_test where diff_count > 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to write abs(count_a - count_b) as diff_count
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea!
Introduces a generic rowcount test to compare with a list of event sources