Converts x to target_type and checks whether the conversion introduced
any new NA values (i.e. values that were non-missing before but became
NA after casting). Returns a list so the caller can decide whether to
apply the result or record an issue.
Value
A list:
- converted
The coerced vector, or
NULLfor unknown types.- success
TRUEif coercion is safe (no new NAs).- issue
A one-row data.table describing the problem, or
NULL.
Details
Separating the attempt from the application means .coerce_all_columns()
never modifies the table for a column that would silently lose data.
