-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[Go] Some types don't follow the ValueStr
<-> AppendValueFromStr
convention
#35421
Comments
I think to properly fix this the tests for Append/ValueStr should be added |
liujiacheng777
pushed a commit
to LoongArch-Python/arrow
that referenced
this issue
May 11, 2023
…Str` & `array.XBuilder.AppendValueFromString` (apache#35457) ### Rationale for this change I noticed that some values produced by `array.X.ValueStr` can't be parsed back by `array.XBuilder.AppendValueFromString` while debugging cloudquery/cloudquery#10284. Additionally, some arrays didn't implement the corresponding functions at all. ### What changes are included in this PR? * Ensure interface contract * Use `array.NullValueStr` constant * Fix bugs found along the way * Synced `internal/types/UUID` with CQ implementation to account for `valid` param ### Are these changes tested? This code was developed in TDD mode. The changes workflow was: 1. Introduce `XStringRoundTrip` tests to test that the resulting array will be equal in the Arrow sense (using [`array.Equal`](https://pkg.go.dev/github.com/apache/arrow/go/v12/arrow/array#Equal)) 2. Fix any discrepancies ### Are there any user-facing changes? Some fixes to the accepted values & parse logic to correspond to the interface contract. * Closes: apache#35421 Authored-by: candiduslynx <candiduslynx@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
ArgusLi
pushed a commit
to Bit-Quill/arrow
that referenced
this issue
May 15, 2023
…Str` & `array.XBuilder.AppendValueFromString` (apache#35457) ### Rationale for this change I noticed that some values produced by `array.X.ValueStr` can't be parsed back by `array.XBuilder.AppendValueFromString` while debugging cloudquery/cloudquery#10284. Additionally, some arrays didn't implement the corresponding functions at all. ### What changes are included in this PR? * Ensure interface contract * Use `array.NullValueStr` constant * Fix bugs found along the way * Synced `internal/types/UUID` with CQ implementation to account for `valid` param ### Are these changes tested? This code was developed in TDD mode. The changes workflow was: 1. Introduce `XStringRoundTrip` tests to test that the resulting array will be equal in the Arrow sense (using [`array.Equal`](https://pkg.go.dev/github.com/apache/arrow/go/v12/arrow/array#Equal)) 2. Fix any discrepancies ### Are there any user-facing changes? Some fixes to the accepted values & parse logic to correspond to the interface contract. * Closes: apache#35421 Authored-by: candiduslynx <candiduslynx@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
rtpsw
pushed a commit
to rtpsw/arrow
that referenced
this issue
May 16, 2023
…Str` & `array.XBuilder.AppendValueFromString` (apache#35457) ### Rationale for this change I noticed that some values produced by `array.X.ValueStr` can't be parsed back by `array.XBuilder.AppendValueFromString` while debugging cloudquery/cloudquery#10284. Additionally, some arrays didn't implement the corresponding functions at all. ### What changes are included in this PR? * Ensure interface contract * Use `array.NullValueStr` constant * Fix bugs found along the way * Synced `internal/types/UUID` with CQ implementation to account for `valid` param ### Are these changes tested? This code was developed in TDD mode. The changes workflow was: 1. Introduce `XStringRoundTrip` tests to test that the resulting array will be equal in the Arrow sense (using [`array.Equal`](https://pkg.go.dev/github.com/apache/arrow/go/v12/arrow/array#Equal)) 2. Fix any discrepancies ### Are there any user-facing changes? Some fixes to the accepted values & parse logic to correspond to the interface contract. * Closes: apache#35421 Authored-by: candiduslynx <candiduslynx@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug, including details regarding any error messages, version, and platform.
It's stated in the
array.Builder
interface description thatAppendValueFromString adds a new value from a string. Inverse of array.ValueStr(i int) string
.However, some types fail to adhere to this rule.
One example I found was
array.DayTimeInterval
(along witharray.DayTimeIntervalBuilder
):array.DayTimeInterval.ValueStr
returns a quoted value fromfmt.Sprintf
array.DayTimeIntervalBuilder.DayTimeIntervalBuilder
tries to parse via JSON marshalingThe issue was likely introduced in #34986
Component(s)
Go
The text was updated successfully, but these errors were encountered: