Closed
Description
We should make sure the type names in the IDataView subsystem are the names we want to use forever.
See
If all of these types are column types, should they include column in the name? e.g. TextColumnType?
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
- 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 inSystem.Data
:DbDataReader
,DbConnection
,DbColumn
, etc. - It could be argued to lower-case the
v
:DvSchema
to follow the same pattern above.
- Note: this is following the
- Currently we have 2 options for the prefix:
- Add the base type suffix to all types that derive from the current
ColumnType
class, using whatever name we decide for the baseColumnType
class. For example, assuming we renameColumnType
=>DataViewType
, we would have:NumberDataViewType
TextDataViewType
BooleanDataViewType
- etc
- Rename the properties on
NumberType
to match the type name inSystem.
namespace.- ex. use
Int16
instead ofI2
. useSingle
instead ofR4
. - For the
UG
property and correspondingstruct RowId
, use whatever we rename theRow
type, followed byId
. Example,DataViewRowId
.
- ex. use
- Rename the
Schema.Metadata
class toSchema.Annotations
, and rename the property onSchema.Column
fromMetadata
toAnnotations
. - Move the
Builder
classes to be nested under the types they build, following the same pattern asSystem.Collections.Immutable
.