Skip to content

Naming overhaul for IDataView subsystem #2297

Closed
@eerhardt

Description

@eerhardt

We should make sure the type names in the IDataView subsystem are the names we want to use forever.

See

  1. Extract IDataView into its own assembly and NuGet package #2220 (comment)

If all of these types are column types, should they include column in the name? e.g. TextColumnType?

  1. Move IDataView to Microsoft.Data.DataView namespace. #2254 (comment)

The idea was broached I know, but resolution never reached: should we rename? Or else perhaps make Schema a nested class of something appropriate, so as to give it definition?

We could rename the class to DataViewSchema, or ViewSchema.
We’d probably want to rename everything then. Row is a pretty generic name. So is ColumnType.


Proposal

  1. We will ensure the class names in the Microsoft.Data.DataView package are unique by adding a prefix to any name deemed too general.
    • Currently we have 2 options for the prefix:
      • DataView, ex. DataViewSchema, DataViewRow, DataViewType.
      • DV, ex. DVSchema, DVRow, DVType.
        • Note: this is following the Db prefix pattern in System.Data: DbDataReader, DbConnection, DbColumn, etc.
        • It could be argued to lower-case the v: DvSchema to follow the same pattern above.
  2. Add the base type suffix to all types that derive from the current ColumnType class, using whatever name we decide for the base ColumnType class. For example, assuming we rename ColumnType => DataViewType, we would have:
    • NumberDataViewType
    • TextDataViewType
    • BooleanDataViewType
    • etc
  3. Rename the properties on NumberType to match the type name in System. namespace.
    • ex. use Int16 instead of I2. use Single instead of R4.
    • For the UG property and corresponding struct RowId, use whatever we rename the Row type, followed by Id. Example, DataViewRowId.
  4. Rename the Schema.Metadata class to Schema.Annotations, and rename the property on Schema.Column from Metadata to Annotations.
  5. Move the Builder classes to be nested under the types they build, following the same pattern as System.Collections.Immutable.

Metadata

Metadata

Assignees

Labels

APIIssues pertaining the friendly API

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions