jorgecarleitao / arrow2

Transmute-free Rust library to work with the Arrow format
Apache License 2.0
1.07k stars 223 forks source link

Relax the checks for the presence of ArrowSchema.name as this field is optional #1499

Closed Qqwy closed 1 year ago

Qqwy commented 1 year ago

As per the spec, the ArrowSchema.name field is optional. SQLite is an example of a producer which does not set this field.

This PR removes the checks on this field, returning an empty string if the field is NULL for backwards compatibility.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 66.66% and project coverage change: -0.03 :warning:

Comparison is base (fb5e4d5) 83.61% compared to head (6be098c) 83.59%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1499 +/- ## ========================================== - Coverage 83.61% 83.59% -0.03% ========================================== Files 388 388 Lines 41910 41912 +2 ========================================== - Hits 35043 35035 -8 - Misses 6867 6877 +10 ``` | [Impacted Files](https://app.codecov.io/gh/jorgecarleitao/arrow2/pull/1499?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao) | Coverage Δ | | |---|---|---| | [src/ffi/schema.rs](https://app.codecov.io/gh/jorgecarleitao/arrow2/pull/1499?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao#diff-c3JjL2ZmaS9zY2hlbWEucnM=) | `90.28% <66.66%> (-0.17%)` | :arrow_down: | ... and [5 files with indirect coverage changes](https://app.codecov.io/gh/jorgecarleitao/arrow2/pull/1499/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

Qqwy commented 1 year ago

@sundy-li The formatter CI pass should now also succeed.