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

Source rowcount generic test #3279

Merged
merged 8 commits into from
May 4, 2023

Conversation

0xRobin
Copy link
Collaborator

@0xRobin 0xRobin commented May 4, 2023

Introduces a generic rowcount test to compare with a list of event sources

@0xRobin 0xRobin marked this pull request as ready for review May 4, 2023 11:11
@0xRobin 0xRobin added ready-for-review this PR development is complete, please review dune team created by dune team labels May 4, 2023
@0xRobin 0xRobin requested a review from jeff-dude May 4, 2023 11:12
Copy link
Member

@jeff-dude jeff-dude left a 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

@jeff-dude jeff-dude removed the ready-for-review this PR development is complete, please review label May 4, 2023
@jeff-dude jeff-dude merged commit dba3a22 into duneanalytics:main May 4, 2023
Comment on lines +79 to +84
- 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')
Copy link
Collaborator

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.

Comment on lines +20 to +26
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
Copy link
Collaborator

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea!

@Hosuke Hosuke mentioned this pull request May 4, 2023
@0xRobin 0xRobin deleted the source_rowcount_generic_test branch July 4, 2023 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dune team created by dune team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants