Skip to content

Remove NoMetadataSchema and make its relatives not ISchema #2080

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

Merged
merged 2 commits into from
Jan 10, 2019

Conversation

wschin
Copy link
Member

@wschin wschin commented Jan 8, 2019

As title. This PR belongs to #1501.

Copy link
Contributor

@TomFinley TomFinley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. I like how the majority of your additions are actually explanatory comments to make this somewhat odd class easier to understand! Thanks @wschin !

@@ -810,27 +810,48 @@ public DataViewSlicer(IHost host, IDataView input, int[] toSlice)
{
var splitter = _splitters[c] = Splitter.Create(_input, toSlice[c]);
_host.Assert(splitter.ColumnCount >= 1);
// One splitter can produce multiple columns because it split a input column into multiple output columns.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

split a [](start = 76, length = 7)

nit: splits an

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.


In reply to: 246276306 [](ancestors = 246276306)

var selectedColumn = _view.Schema[col];
var schemaBuilder = new SchemaBuilder();
for (int c = 0; c < _lims.Length; ++c)
schemaBuilder.AddColumn(selectedColumn.Name, _types[c]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

schemaBuilder.AddColumn(selectedColumn.Name, _types[c]); [](start = 27, length = 57)

double-checking that omitting metadata is deliberate.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is reasonable because splitting a vector-valued column breaks most metadata. It's why previously Splitter was a NoMetadataSchema.


In reply to: 246463230 [](ancestors = 246463230)

@wschin wschin self-assigned this Jan 10, 2019
@wschin wschin force-pushed the remove-an-ischema-family branch from 4000d1e to adc2db2 Compare January 10, 2019 16:40
@wschin wschin merged commit 925d9da into dotnet:master Jan 10, 2019
@wschin wschin deleted the remove-an-ischema-family branch January 10, 2019 17:17
@ghost ghost locked as resolved and limited conversation to collaborators Mar 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants