[FEEDBACK WANTED] Don't create column from dataset #216
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I may be missing some context here, but it seems like the current way of selecting a column can lead to runtime errors that the compiler okays.
Currently, columns are selected using the dataset's
col
method. The compile time check however only ensures that the field exists in the Dataset's typeT
. However, this does not prevent one from selecting a column from a different dataset of the sameT
at compile time resulting in a runtime blow up.One way to get around this is started in this PR. Instead of selecting the dataset's col, create a general column instead. This would at least line up with what the compiler is proving, simply that a col of field
foo
exists inT
and has the typeU
but not that the column requested is that specific dataset's column.example:
Are there other ways to get around this?
Is this not considered an issue to be concerned about?