Skip to content

Add @CandidateForRemoval annotation #1032

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

Merged
merged 2 commits into from
Jan 29, 2025
Merged

Add @CandidateForRemoval annotation #1032

merged 2 commits into from
Jan 29, 2025

Conversation

koperagen
Copy link
Collaborator

@koperagen koperagen commented Jan 27, 2025

#1028

For DataRow.isEmpty and DataRow.isNotEmpty is hard to imagine situation where it'd be used
DataFrame.copy is useless
DataRow.getRows() is a short cut that can be easily replaced, and also hard to imagine a usecase

@koperagen koperagen self-assigned this Jan 27, 2025
@koperagen koperagen force-pushed the candidate-for-removal branch 2 times, most recently from c58096a to cc307f1 Compare January 28, 2025 12:53
@Jolanrensen Jolanrensen self-requested a review January 28, 2025 13:52
@@ -20,8 +21,10 @@ import kotlin.experimental.ExperimentalTypeInference
import kotlin.reflect.KProperty
import kotlin.reflect.KType

@CandidateForRemoval
public fun AnyRow.isEmpty(): Boolean = owner.columns().all { it[index] == null }
Copy link
Collaborator

Choose a reason for hiding this comment

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

could be moved to internal maybe? it's used at least once

@@ -166,12 +169,16 @@ public fun AnyRow.columnNames(): List<String> = df().columnNames()

public fun AnyRow.columnTypes(): List<KType> = df().columnTypes()

@CandidateForRemoval
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think these ones should just be documented and better tested. It's in the same family of functions as relative which is powerful in the add DSL. And to populate a column with values using, for instance getRow(0).someCol as part of the calculation seems quite critical. Again, we just need more examples. Though, marking them as CandidateForRemoval is a good way for us to start looking into it again later :)

@koperagen koperagen force-pushed the candidate-for-removal branch from cc307f1 to 633bc9e Compare January 29, 2025 11:09
@koperagen koperagen merged commit a9e70da into master Jan 29, 2025
3 checks passed
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.

2 participants