-
Notifications
You must be signed in to change notification settings - Fork 22
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
Remove DataFrames completely #1035
Conversation
Benchmark Results
Benchmark PlotsA plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1035 +/- ##
=======================================
Coverage 97.86% 97.86%
=======================================
Files 29 29
Lines 982 985 +3
=======================================
+ Hits 961 964 +3
Misses 21 21 ☔ View full report in Codecov by Sentry. |
99dfa62
to
de68fd7
Compare
de68fd7
to
f74f0d5
Compare
WHERE asset = '$(row.asset)' AND year = $(row.year) AND rep_period = $(row.rep_period) | ||
", | ||
) | ||
])::Int |
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.
This comment is for my understanding: ::Int
is here to ensure type stability since we know in advance that the result will be an Int, but Julia can't know it in advance because it comes from a SQL query. Is that correct?
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.
Exactly. The draft PR #1055 will add more of these.
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.
Thanks for the PR. The code looks cleaner, and deleting dependencies is good 😄 The code was also initially review on the Tulipa working day. I left a comment for my learning porpuse, so that it is why it is approved now.
Now that DuckDB is being used almost everywhere, we can finish the job and remove DataFrames.
This mostly means:
indices
is now a DuckDB thing. To loop over it we don't need to usefor row in eachrow(indices)
, justfor row in indices
.It should also be possible to do the following improvements, which can be considered "nice to have":
indices
, instead storeconnection
and when it is desirable to loop, call the query to create the looping object. I'm not sure this is actually necessary or useful, because I believe the DuckDBindices
will never be store materialised. So in practice it should be the same efficiency/memory use.Related issues
Related to #701
Checklist