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

Synchronize ByRow and Tables.subset with Tables.jl 1.8 #3158

Merged
merged 8 commits into from
Sep 18, 2022

Conversation

bkamins
Copy link
Member

@bkamins bkamins commented Sep 16, 2022

Fixes #3127

@bkamins bkamins added the ecosystem Issues in DataFrames.jl ecosystem label Sep 16, 2022
@bkamins bkamins added this to the 1.4 milestone Sep 16, 2022
Project.toml Outdated Show resolved Hide resolved
@bkamins
Copy link
Member Author

bkamins commented Sep 17, 2022

@nalimilan - could you please review this. Due to changes in Tables.jl 1.8 tests in DataFrames.jl will fail in all other PRs, so this PR needs to be merged first and next all other PRs must be updated against new main.

src/other/tables.jl Outdated Show resolved Hide resolved
@@ -103,3 +103,12 @@ IteratorInterfaceExtensions.getiterator(df::AbstractDataFrame) =
Tables.datavaluerows(Tables.columntable(df))
IteratorInterfaceExtensions.isiterable(x::AbstractDataFrame) = true
TableTraits.isiterabletable(x::AbstractDataFrame) = true

function Tables.subset(df::AbstractDataFrame, inds; view::Union{Bool, Nothing}=nothing)
Copy link
Member

Choose a reason for hiding this comment

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

Should we use @inline to ensure the return type is inferred?

Copy link
Member Author

@bkamins bkamins Sep 17, 2022

Choose a reason for hiding this comment

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

added. It should not be a problem - the function is small (on newer Julia constant propagation also should be applied without inlining AFAICT, x-ref: JuliaLang/julia#43852).

Copy link
Member Author

Choose a reason for hiding this comment

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

I added @inferred where applicable

Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
src/other/tables.jl Outdated Show resolved Hide resolved
@bkamins bkamins merged commit d6277e4 into main Sep 18, 2022
@bkamins bkamins deleted the bk/sync_tables_1.8 branch September 18, 2022 08:02
@bkamins
Copy link
Member Author

bkamins commented Sep 18, 2022

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ecosystem Issues in DataFrames.jl ecosystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add Tables.subset and move ByRow to Tables
3 participants