-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Remove IRowCursorConsolidator #1867
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
Comments
Now that I've started working on this, I am no longer convinced at all that having an "official" utility method somewhere is useful. The most common user by far of this is other So, I will take out the consolidator, and not (at least at first) replace it with anything. I will instead update the descriptions of row cursor sets so it is more clear how to consume them (and what the role of This is outlined by the fact that throughout even our own codebase, of all the things that were done with cursor sets, actual consolidation only happened in one or two places. |
Consider this method:
machinelearning/src/Microsoft.ML.Core/Data/IDataView.cs
Lines 114 to 115 in 9067a1b
This returns an instance of the mysterious
IRowCursorConsolidator
interface. Why an interface? In retrospect I'm not quite sure.Having an interface allows for different implementations, but we've never actually really exploited that capability. Nor, even if we were of such a mind to do so, would it be clear how we could. What would they even do differently? The semantics around
Batch
and whatnot are sufficiently clear and simple as to make only one implementation obvious, and even if we did have different implementations since the resulting cursors result most often from transformers (that is, components downstream from the set creation), they couldn't really do anything radically different anyway, since to do anything implementation specific on any cursor would be to break the composability at the core of what makesIDataView
work at all.So: get rid of this interface, and replace all usage of it with a simple utility method somewhere that can be called to do the reconciliation. It needn't even be a public utility method, but there may be reasons to do so.
The text was updated successfully, but these errors were encountered: