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

Add an option to not copy columns when constructing a TSFrame #142

Merged
merged 8 commits into from
Mar 10, 2023

Conversation

asinghvi17
Copy link
Member

@asinghvi17 asinghvi17 commented Jan 23, 2023

Needs tests. Basically, this allows us to construct a TSFrame with negligible overhead.

It's based off asinghvi17:issorted, so once that's merged I'll rebase this.

src/TSFrame.jl Outdated Show resolved Hide resolved
@asinghvi17 asinghvi17 marked this pull request as ready for review February 8, 2023 03:49
src/TSFrame.jl Outdated Show resolved Hide resolved
This allows the user to tell TSFrames whether they want the columns of the input to be copied or not.  With this and `issorted`, one can construct a TSFrame with almost no overhead.

This feature is required for the join functions to have performance comparable to R.
It looks like the sorting order was changed, so we just check if the setdiff is empty here.
@asinghvi17
Copy link
Member Author

Huh! It looks like something changed the sort order for the columns. Ideally we should be using isempty(setdiff(...)) instead of equality here anyway, what do you think @chiraganand?

@chiraganand
Copy link
Member

Huh! It looks like something changed the sort order for the columns. Ideally we should be using isempty(setdiff(...)) instead of equality here anyway, what do you think @chiraganand?

This shouldn't be a problem.

PS: Avoid force-pushing because it breaks code coverage and creates problems while merging the branch into main, though it can be done easily by squashing but that loses commit history from the branch.

@codecov-commenter
Copy link

codecov-commenter commented Feb 27, 2023

Codecov Report

Merging #142 (0f434a5) into main (dd702ea) will decrease coverage by 0.02%.
The diff coverage is 96.87%.

@@            Coverage Diff             @@
##             main     #142      +/-   ##
==========================================
- Coverage   91.41%   91.39%   -0.02%     
==========================================
  Files          20       20              
  Lines         431      430       -1     
==========================================
- Hits          394      393       -1     
  Misses         37       37              
Impacted Files Coverage Δ
src/TSFrame.jl 97.95% <96.87%> (ø)
src/utils.jl 86.36% <0.00%> (-0.21%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@asinghvi17
Copy link
Member Author

bump @chiraganand - I think this should be mergeable now.

@chiraganand chiraganand merged commit 305267d into xKDR:main Mar 10, 2023
@chiraganand chiraganand mentioned this pull request Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants