-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Naming overhaul for IDataView subsystem #2297
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
We may also want to rename the static properties on
should all match the .NET type names:
Especially |
Also related is: #1843 |
That's one possibility. Before we go that route though, I'd like to explore whether the name "column type" is meaningful -- it was back when the only things did was describe the types of columns in data views, but that hasn't been the case for a while.
Let's explore that. If we embraced this idea of It is also potentially confusing, since we are using "data view" in a way that is distinct from the actual type: that is, pertaining to data-view-interacting objects, as opposed to data-views themselves. Since, these structures are used in contexts other than data views directly (though ultimately, one way or another, they are all feedable back to or from dataviews.) Also if I look at other libraries it is not clear to me what we should do. Spark clearly gets by just fine with names that would certainly be considered by the .NET team's standards way too generic. That by itself is not really an argument, but the reality is we haven't really heard a complaint yet about ADO.NET, if I look for similar structures, solved the problem by prefixing everything with So my opinions are not very strong one way or the other. It might be one of these things where it becomes more clear that something is acceptable or unacceptable once a solid proposal is made. I just don't know yet for myself. But of course as we say, on the subject of types names we've reached the point where it is, speak now or forever hold your peace. |
For reference, a dump of the public surface of the DataView nupkg is here |
I have updated the original comment with a proposal. Please take a look and provide any feedback (especially please weigh-in on the options for the prefix for (1)). /cc @terrajobst @NiklasGustafsson @KrzysztofCwalina @ericstj @stephentoub |
Should we meet to discuss this? Back and forth on GitHub might not be the best way to close on this. I'm happy to set aside some time. I think a one-hour meeting should get us close. |
Here is a dump of the proposed public surface after the changes above. https://gist.github.com/eerhardt/eff7e207673e1fde40a5696eb07ba273 I'll book some time to close on this, @terrajobst. |
We had a meeting and approved the proposal with the following changes:
|
…o follow the immutable collections pattern (and StringBuilder). Working towards dotnet#2297
* Move MetadataBuilder to be DataViewSchema.Metadata.Builder. * Move SchemaBuilder to DataViewSchema.Builder. * Rename `GetMetadata` and `GetSchema` to `ToMetadata` and `ToSchema` to follow the immutable collections pattern (and StringBuilder). Working towards #2297
- Remove it from the NumberDataViewType. - Remove any method/operator that makes it feel like a number. Working towards dotnet#2297
- Remove it from the NumberDataViewType. - Remove any method/operator that makes it feel like a number. Working towards dotnet#2297
* Make DataViewRowId not act like a number. - Remove it from the NumberDataViewType. - Remove any method/operator that makes it feel like a number. Working towards #2297
We should make sure the type names in the IDataView subsystem are the names we want to use forever.
See
Proposal
Microsoft.Data.DataView
package are unique by adding a prefix to any name deemed too general.DataView
, ex.DataViewSchema
,DataViewRow
,DataViewType
.DV
, ex.DVSchema
,DVRow
,DVType
.Db
prefix pattern inSystem.Data
:DbDataReader
,DbConnection
,DbColumn
, etc.v
:DvSchema
to follow the same pattern above.ColumnType
class, using whatever name we decide for the baseColumnType
class. For example, assuming we renameColumnType
=>DataViewType
, we would have:NumberDataViewType
TextDataViewType
BooleanDataViewType
NumberType
to match the type name inSystem.
namespace.Int16
instead ofI2
. useSingle
instead ofR4
.UG
property and correspondingstruct RowId
, use whatever we rename theRow
type, followed byId
. Example,DataViewRowId
.Schema.Metadata
class toSchema.Annotations
, and rename the property onSchema.Column
fromMetadata
toAnnotations
.Builder
classes to be nested under the types they build, following the same pattern asSystem.Collections.Immutable
.The text was updated successfully, but these errors were encountered: