Skip to content

Conversation

@candiduslynx
Copy link
Contributor

@candiduslynx candiduslynx commented May 6, 2023

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)
  2. Fix any discrepancies

Are there any user-facing changes?

Some fixes to the accepted values & parse logic to correspond to the interface contract.

@candiduslynx candiduslynx requested a review from zeroshade as a code owner May 6, 2023 06:26
@github-actions
Copy link

github-actions bot commented May 6, 2023

@github-actions
Copy link

github-actions bot commented May 6, 2023

⚠️ GitHub issue #35421 has been automatically assigned in GitHub to PR creator.

@candiduslynx
Copy link
Contributor Author

candiduslynx commented May 6, 2023

@zeroshade I see that some tests fail due to unavailability of generics (Go 1.17).
Is this something critical to move to non-generics implementation?
I assumed generics would be fine considering Go 1.20 targeted in go.mod

UPD: done in 29a1181181fbfc3f8ff244227c9b0dc6aaa50c67

@candiduslynx candiduslynx force-pushed the fix/array/valuestr-appendvaluefromstring-contract branch 2 times, most recently from 0533bda to ea7e636 Compare May 6, 2023 08:25
Copy link
Contributor Author

@candiduslynx candiduslynx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, seems like now all workflows should pass

@candiduslynx
Copy link
Contributor Author

candiduslynx commented May 8, 2023

@zeroshade, could you please tell me if there is a chance to get review sooner?

I'd like to sync this to cloudquery/cloudquery#10284 and use the ValueStr instead of JSON marshaling by default.

kodiakhq bot pushed a commit to cloudquery/plugin-sdk that referenced this pull request May 8, 2023
…r` & `types.XBuilder.AppendValueFromString` (#849)

Follow-up to apache/arrow#35457

BEGIN_COMMIT_OVERRIDE
chore(tests): Ensure interface contract between `types.XArray.ValueStr` & `types.XBuilder.AppendValueFromString` (#849)

feat(arrow): Add `types.XBuilder.NewXArray` helpers
END_COMMIT_OVERRIDE
@candiduslynx candiduslynx force-pushed the fix/array/valuestr-appendvaluefromstring-contract branch 2 times, most recently from df8a331 to 4e2b295 Compare May 8, 2023 12:28
Copy link
Member

@zeroshade zeroshade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks good to me, just a few questions and some nitpicks.

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels May 8, 2023
@candiduslynx candiduslynx force-pushed the fix/array/valuestr-appendvaluefromstring-contract branch from 4e2b295 to f765a9a Compare May 8, 2023 16:01
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels May 8, 2023
@candiduslynx candiduslynx requested a review from zeroshade May 8, 2023 16:26
kodiakhq bot pushed a commit to cloudquery/plugin-sdk that referenced this pull request May 8, 2023
@candiduslynx candiduslynx force-pushed the fix/array/valuestr-appendvaluefromstring-contract branch from d16fc4c to cd9de70 Compare May 8, 2023 17:09
Copy link
Contributor Author

@candiduslynx candiduslynx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zeroshade so, I guess I addressed everything that's been asked for.
Can you take another look?

Copy link
Member

@zeroshade zeroshade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one question to confirm, otherwise LGTM

Copy link
Member

@zeroshade zeroshade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one question to confirm, otherwise LGTM

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels May 8, 2023
@candiduslynx
Copy link
Contributor Author

Removed the extra piece in 2bf65c5, thanks for the review!

@candiduslynx
Copy link
Contributor Author

@zeroshade the checks are finally done (I wonder if the largest one (conda) has to run the whole test suite, though)

@zeroshade zeroshade merged commit 05a57de into apache:main May 8, 2023
@candiduslynx candiduslynx deleted the fix/array/valuestr-appendvaluefromstring-contract branch May 9, 2023 04:48
@ursabot
Copy link

ursabot commented May 9, 2023

Benchmark runs are scheduled for baseline = b211c18 and contender = 05a57de. 05a57de is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed ⬇️4.44% ⬆️0.0%] test-mac-arm
[Finished ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Failed ⬇️0.0% ⬆️0.0%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 05a57dec ec2-t3-xlarge-us-east-2
[Failed] 05a57dec test-mac-arm
[Finished] 05a57dec ursa-i9-9960x
[Failed] 05a57dec ursa-thinkcentre-m75q
[Finished] b211c189 ec2-t3-xlarge-us-east-2
[Failed] b211c189 test-mac-arm
[Finished] b211c189 ursa-i9-9960x
[Failed] b211c189 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@ursabot
Copy link

ursabot commented May 9, 2023

['Python', 'R'] benchmarks have high level of regressions.
test-mac-arm

liujiacheng777 pushed a commit to LoongArch-Python/arrow that referenced this pull request 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 <[email protected]>
Signed-off-by: Matt Topol <[email protected]>
ArgusLi pushed a commit to Bit-Quill/arrow that referenced this pull request 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 <[email protected]>
Signed-off-by: Matt Topol <[email protected]>
@raulcd
Copy link
Member

raulcd commented May 18, 2023

@github-actions crossbow submit verify-rc-source-integration-linux*

@github-actions
Copy link

Revision: 2bf65c5

Submitted crossbow builds: ursacomputing/crossbow @ actions-0f9abaae22

Task Status
verify-rc-source-integration-linux-almalinux-8-amd64 Github Actions
verify-rc-source-integration-linux-conda-latest-amd64 Github Actions
verify-rc-source-integration-linux-ubuntu-20.04-amd64 Github Actions
verify-rc-source-integration-linux-ubuntu-22.04-amd64 Github Actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Go] Some types don't follow the ValueStr <-> AppendValueFromStr convention

4 participants