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
Adding registrar4 to ENS registration and renewal views #3468
Conversation
Workflow run id 5165499718 approved. |
Workflow run id 5165499717 approved. |
Workflow run id 5179666916 approved. |
Workflow run id 5179666917 approved. |
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.
Hi @web3lyt,
as this PR is currently out-of-date, please run git merge main
or use other ways to sync with the latest main branch.
Thank you.
SELECT *, NULL AS premium | ||
FROM {{source('ethereumnameservice_ethereum', 'ETHRegistrarController_1_evt_NameRegistered')}} | ||
UNION | ||
SELECT * | ||
SELECT *, NULL AS premium | ||
FROM {{source('ethereumnameservice_ethereum', 'ETHRegistrarController_2_evt_NameRegistered')}} | ||
UNION | ||
SELECT * | ||
SELECT *, NULL AS premium |
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.
Hi @web3lyt, we can cast NULL to its expected type for premium
field.
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.
That doesn't seem necessary. In sparksql, the datatype requirements are lax, and in dunesql, this still makes the field end up as a UINT256. Further, since this view needs to work in both sparksql and dunesql, I can't CAST the datatype to a common one unless I change it to INT in the raw table as well in both versions. It's much messier if I cast, this works better.
Workflow run id 5189720908 approved. |
Workflow run id 5189720911 approved. |
Workflow run id 5189726973 approved. |
Workflow run id 5189726975 approved. |
I merged but this PR isn't ready anyway. Was fixing some issues. Reverted back some changes to see why they were causing issue, as it actually should have been working back then. |
thinking out loud here. my best guess is since the view is built on spark engine (all of spellbook is, as of now), the fields are still string and not @jmsgu can you help confirm this theory or help us see why this is failing? |
@jeff-dude i'm looking into this, currently suspect this is an issue with the catalog used in the test query as directly querying |
Catalog setup appears to be working as intended. In the meantime, can we do an explicit type conversion from varchar to uint256 for those columns being added together? Did a quick test on this, and I had to add a cast on the |
i don't think we can add a cast to unit256 in the spell, as the view is built on spark first, which should fail on that. if our only option is to cast, we will need to either materialize as table or wait until spellbook migration to trino |
closing PRs marked as |
seems like it wasn't very possible when view spells were supposed to work on both engines at the same time anyway. I look forward to having to only write it in dunesql |
Brief comments on the purpose of your changes:
For Dune Engine V2
I've checked that:
General checks:
lowercase_snake_cased
Pricing checks:
coin_id
represents the ID of the coin on coinpaprika.comJoin logic:
Incremental logic: