Skip to content
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

Do not guess type = any, potentially provide opt-in #168

Open
3 tasks
peterdesmet opened this issue Jan 10, 2024 · 0 comments
Open
3 tasks

Do not guess type = any, potentially provide opt-in #168

peterdesmet opened this issue Jan 10, 2024 · 0 comments
Labels
complexity:low Likely not complex to implement datapackage:v2 function:read_resource Function read_resource()

Comments

@peterdesmet
Copy link
Member

peterdesmet commented Jan 10, 2024

CHANGELOG: https://datapackage.org/overview/changelog/#any-field-type-updated

any is now the default field type and clarifies that the field type should not be inferred if not provided (#13).

In case of CSV files, values should therefore be interpreted as a string. read_resource() however, currently mimics readr::read_delim() default behaviour of guessing the data type of a column when it is undefined (i.e. no type property is provided). read_delim() allows to turn of that behaviour (by specifying col_types).

Reverting to strings for any (= and thus also not provided types) may have a big impact to users, so maybe read_resource() should provide a col_guess argument with default FALSE., and should only be done for v2 (see #226).

  • Implement changes
  • Update documentation
  • Update tests
@peterdesmet peterdesmet added the function:read_resource Function read_resource() label Jan 10, 2024
@peterdesmet peterdesmet added this to the 1.2.0 milestone Mar 27, 2024
@peterdesmet peterdesmet changed the title Provide option to opt-out of guessing type if undefined Do not guess type = any, potentially provide opt-in Jul 3, 2024
@peterdesmet peterdesmet added the complexity:low Likely not complex to implement label Jul 3, 2024
@peterdesmet peterdesmet removed this from the 1.2.0 milestone Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity:low Likely not complex to implement datapackage:v2 function:read_resource Function read_resource()
Projects
None yet
Development

No branches or pull requests

1 participant