Description
We have this overload for CreateTextLoader<TInput>
, where the schema is defined in TInput
.
The dataSample
argument is meant to be used to infer schema. Since TInput
must contain at least one field, there is always at least one column in the schema. Then, this condition is never hit, and consequently, dataSample
is never used to infer the schema with the CreateTextLoader<TInput>
overload.
Presence of the dataSample
argument is confusing here as it implies that a sample can be provided. In other places, this sample is used to infer schema, so the user would expect this to be the case here as well, but dataSample
is ignored here.
I will update the documentation to reflect this, but this should be removed. Since this will be an API breaking change, this should be revisited for 2.0.