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

Can no longer subclass DataFrameColumn due to internal abstract GetSortIndices method #7323

Closed
charliebone opened this issue Nov 20, 2024 · 3 comments · Fixed by #7324
Closed
Labels

Comments

@charliebone
Copy link

Hello,

I'm glad v0.22 is published with some fixes I have been waiting for. However, there is now an issue.

I inherit from the DataFrameColumn class to build my own DataFrameColumn implementation. The reasons aren't super important but it's used allow for some implementations of extension methods on the DataFrameColumn class that do computations that require certain data types. The class is a public abstract class, which indicated to me as a user of the ml.net library it was fair game to override and to continue writing extension methods that all were based on the DataFrameColumn abstract base class.

Now, we have an internal abstract method present in the base class, making overriding impossible even though every other abstract method and property is either public or protected:

internal abstract PrimitiveDataFrameColumn<long> GetSortIndices(bool ascending, bool putNullValuesLast);

Is there anything that can be done to remedy this?

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged label Nov 20, 2024
@charliebone charliebone changed the title Can no longer implement DataFrameColumn due to internal abstract GetSortIndices method Can no longer subclass DataFrameColumn due to internal abstract GetSortIndices method Nov 20, 2024
@asmirnov82
Copy link
Contributor

Hi @charliebone. I implemented fix for this.
You may try to inherit from the PrimitiveDataFrameColumn class as a workaround, if it's possible in your scenario (though T should be a value type)

@charliebone
Copy link
Author

Hi @asmirnov82, thank you for the prompt reply and fix! Any idea when it'll make it out into the wild?

I have considered inheriting from PrimitiveDataFrame instead, and perhaps I'll go that route in the interim. Thanks again for the fast fix!

@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged label Nov 27, 2024
@asmirnov82
Copy link
Contributor

@charliebone, I created PR #7331 for including these changes to the 4.0.1 release. I don't have any insights when it may be shipped to production, vut according to previouse years I expect it to happen in the nearest couple of months

@github-actions github-actions bot locked and limited conversation to collaborators Jan 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants