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

[Breaking] Return missing if the field is set but null. #238

Merged
merged 14 commits into from
Oct 8, 2021

Commits on Aug 31, 2021

  1. Return missing if the field is set but null.

    Fixes #177 .
    
    I think this aligns the behavior a lot better across the different file formats (see the test sets in test/test_tables.jl)
    
    This behavior is implemented through `getfield(feature, i)` which makes use of `getfieldtype(feature, i)`. That way, we are aligned in behavior for field subtypes even for e.g. displaying the fields.
    
    Because a lot hinges on distinguishing between whether a field is set versus whether it is null (see Toblerity/Fiona#460 (comment)), I have also added support for `isfieldnull()`, `isfieldsetandnotnull()`, and `setfieldnull!()`.
    yeesian committed Aug 31, 2021
    Configuration menu
    Copy the full SHA
    042fab2 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2021

  1. Configuration menu
    Copy the full SHA
    e59dd31 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2021

  1. Configuration menu
    Copy the full SHA
    f18c8c6 View commit details
    Browse the repository at this point in the history
  2. Add tests and implementation for getfield with missing values

    As mathieu has observed, `OGRUnsetMarker` and `OGRNullMarkerare` are mutually exclusive. We implement that case to return nothing if it ever comes up, but it is not possible for us to the corresponding code path.
    yeesian committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    bc2f038 View commit details
    Browse the repository at this point in the history
  3. Update the implementation

    yeesian committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    9584962 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    efd22c7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    763d839 View commit details
    Browse the repository at this point in the history
  6. remove assertions

    yeesian committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    63b6f98 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2021

  1. Map unset fields to nothing and null values to missing

    Because getdefault() is meant to be used only when setting fields for notnullable columns with missing values, we make it return `nothing` instead of `missing` to unset the field.
    yeesian committed Sep 25, 2021
    Configuration menu
    Copy the full SHA
    08ffc27 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2021

  1. Configuration menu
    Copy the full SHA
    364f171 View commit details
    Browse the repository at this point in the history
  2. use isfieldset() and isfieldnull() when getting a field

    isfieldsetandnotnull() is just a convenience function.
    yeesian committed Sep 26, 2021
    Configuration menu
    Copy the full SHA
    323cbdb View commit details
    Browse the repository at this point in the history
  3. raise an error instead of getting default if we do not recognize the …

    …fieldtype when reading the field
    
    (in the future, we will switch to dispatch on the fieldtype rather than the current dictionary approach, but that is out of the scope of this commit.)
    yeesian committed Sep 26, 2021
    Configuration menu
    Copy the full SHA
    5c7b677 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    092bed4 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2021

  1. Configuration menu
    Copy the full SHA
    a7710c2 View commit details
    Browse the repository at this point in the history