-
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
SPE-15 migrate dex_aggregator.trades
to dunesql engine
#4320
Conversation
dex_aggregator.trades
to dunesql enginedex_aggregator.trades
to dunesql engine
#4285 (zeroex op spells) is ready for review. |
#4273 (zeroex polygon spells) is ready for review. |
#4410 (zeroex arbitrum, avaxc, fantom spells) is ready for review. |
Added some missing |
e5ed223
to
2e1458c
Compare
I removed the partioning, the table was overpartitioned with block_month now it's slightly under partitioned but I think it's fine. |
@jeff-dude I removed the deduplication, let me know if we should add it back. |
block_time, | ||
block_number, | ||
tx_hash, | ||
evt_index, | ||
CAST(NULL as array<bigint>) as trace_address, | ||
ARRAY[-1] as trace_address, |
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.
We should use a null array here
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.
why is that? we are using this across all models it seems, not sure why though. One thing to keep in mind is that this is used in the unique key and nulls can cause issues there sometimes.
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 guess it was null before though so shouldn't really be a problem. @jeff-dude @couralex6 do you have any context on why we are using ARRAY[-1]
vs null array?
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 will merge this and do a sweeping PR (since they are all over the place already) of ARRAY[-1]
replacements if we decide that it's needed.
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.
yeah, the column is a unique key, so null doesn't find a match on merge joins, therefore inserting rows again. null arrays must have worked differently on spark then. i vaguely recall a small difference during migration (may have been different table/column). you can give it a test on one of the base-level project models that use the hardcoded -1 to see what happens
todo: