You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "yevgenypats (via GitHub)" <gi...@apache.org> on 2023/04/20 16:23:11 UTC

[GitHub] [arrow] yevgenypats opened a new pull request, #35257: GH-35156: [Go] Add ToMap to Metadata

yevgenypats opened a new pull request, #35257:
URL: https://github.com/apache/arrow/pull/35257

   <!--
   Thanks for opening a pull request!
   If this is your first pull request you can find detailed information on how 
   to contribute here:
     * [New Contributor's Guide](https://arrow.apache.org/docs/dev/developers/guide/step_by_step/pr_lifecycle.html#reviews-and-merge-of-the-pull-request)
     * [Contributing Overview](https://arrow.apache.org/docs/dev/developers/overview.html)
   
   
   If this is not a [minor PR](https://github.com/apache/arrow/blob/main/CONTRIBUTING.md#Minor-Fixes). Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose
   
   Opening GitHub issues ahead of time contributes to the [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) of the Apache Arrow project.
   
   Then could you also rename the pull request title in the following format?
   
       GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   or
   
       MINOR: [${COMPONENT}] ${SUMMARY}
   
   In the case of PARQUET issues on JIRA the title also supports:
   
       PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   -->
   
   ### Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   ### What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   ### Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   ### Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please uncomment the line below and explain which changes are breaking.
   -->
   <!-- **This PR includes breaking changes to public APIs.** -->
   
   <!--
   Please uncomment the line below (and provide explanation) if the changes fix either (a) a security vulnerability, (b) a bug that caused incorrect or invalid data to be produced, or (c) a bug that causes a crash (even when the API contract is upheld). We use this to highlight fixes to issues that may affect users without their knowledge. For this reason, fixing bugs that cause errors don't count, since those are usually obvious.
   -->
   <!-- **This PR contains a "Critical Fix".** -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #35257: GH-35156: [Go] Add ToMap to Metadata

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35257:
URL: https://github.com/apache/arrow/pull/35257#issuecomment-1516615535

   * Closes: #35156


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zeroshade commented on a diff in pull request #35257: GH-35156: [Go] Add ToMap to Metadata

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on code in PR #35257:
URL: https://github.com/apache/arrow/pull/35257#discussion_r1173866628


##########
go/arrow/schema_test.go:
##########
@@ -99,6 +100,9 @@ func TestMetadata(t *testing.T) {
 			if got, want := tc.md.String(), tc.serialize; got != want {
 				t.Fatalf("invalid stringer: got=%q, want=%q", got, want)
 			}
+			if len(tc.kvs) != 0 {
+				assert.Equal(t, tc.kvs, md.ToMap())
+			}

Review Comment:
   how about adding a round trip test:
   
   create a map, construct the metadata from the map, then call `ToMap` on the result and assert the two maps are equal.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #35257: GH-35156: [Go] Add ToMap to Metadata

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35257:
URL: https://github.com/apache/arrow/pull/35257#issuecomment-1516615575

   :warning: GitHub issue #35156 **has been automatically assigned in GitHub** to PR creator.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] ursabot commented on pull request #35257: GH-35256: [Go] Add ToMap to Metadata

Posted by "ursabot (via GitHub)" <gi...@apache.org>.
ursabot commented on PR #35257:
URL: https://github.com/apache/arrow/pull/35257#issuecomment-1519100977

   ['Python', 'R'] benchmarks have high level of regressions.
   [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/470beeecca5d465f96a9e9059306b5d6...671df5557fca4a11bc4954b01ef8c4e4/)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #35257: GH-35256: [Go] Add ToMap to Metadata

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35257:
URL: https://github.com/apache/arrow/pull/35257#issuecomment-1518709745

   :warning: GitHub issue #35256 **has been automatically assigned in GitHub** to PR creator.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zeroshade commented on a diff in pull request #35257: GH-35156: [Go] Add ToMap to Metadata

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on code in PR #35257:
URL: https://github.com/apache/arrow/pull/35257#discussion_r1174440028


##########
go/arrow/schema_test.go:
##########
@@ -99,6 +100,9 @@ func TestMetadata(t *testing.T) {
 			if got, want := tc.md.String(), tc.serialize; got != want {
 				t.Fatalf("invalid stringer: got=%q, want=%q", got, want)
 			}
+			if len(tc.kvs) != 0 {
+				assert.Equal(t, tc.kvs, md.ToMap())
+			}

Review Comment:
   ah perfect



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] yevgenypats commented on a diff in pull request #35257: GH-35156: [Go] Add ToMap to Metadata

Posted by "yevgenypats (via GitHub)" <gi...@apache.org>.
yevgenypats commented on code in PR #35257:
URL: https://github.com/apache/arrow/pull/35257#discussion_r1174156926


##########
go/arrow/schema_test.go:
##########
@@ -99,6 +100,9 @@ func TestMetadata(t *testing.T) {
 			if got, want := tc.md.String(), tc.serialize; got != want {
 				t.Fatalf("invalid stringer: got=%q, want=%q", got, want)
 			}
+			if len(tc.kvs) != 0 {
+				assert.Equal(t, tc.kvs, md.ToMap())
+			}

Review Comment:
   I think we already have a round trip test here. We have `MetadataFrom` call on line 81



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #35257: GH-35256: [Go] Add ToMap to Metadata

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35257:
URL: https://github.com/apache/arrow/pull/35257#issuecomment-1518709736

   * Closes: #35256


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zeroshade merged pull request #35257: GH-35256: [Go] Add ToMap to Metadata

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade merged PR #35257:
URL: https://github.com/apache/arrow/pull/35257


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] ursabot commented on pull request #35257: GH-35256: [Go] Add ToMap to Metadata

Posted by "ursabot (via GitHub)" <gi...@apache.org>.
ursabot commented on PR #35257:
URL: https://github.com/apache/arrow/pull/35257#issuecomment-1519100800

   Benchmark runs are scheduled for baseline = a1403d46916ac6daa419cc688c5fb19980a59e60 and contender = 8601aac9ee2c35eb38d70f2fa90f8cb82c4dafc5. 8601aac9ee2c35eb38d70f2fa90f8cb82c4dafc5 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Finished :arrow_down:0.0% :arrow_up:0.0%] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/4b22d4cc09b94339b55bee670ca642ab...a8dbe4a7de4f4fb1aa9d119cc32c3693/)
   [Failed] [test-mac-arm](https://conbench.ursa.dev/compare/runs/4d5a6d41005f45a496b996c23555f782...dd9cbf0f2f00444a81686229ef08f854/)
   [Finished :arrow_down:1.53% :arrow_up:0.0%] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/470beeecca5d465f96a9e9059306b5d6...671df5557fca4a11bc4954b01ef8c4e4/)
   [Finished :arrow_down:0.54% :arrow_up:0.0%] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/c5c0ecb509604fe390a272665ae59d01...e75ed870da9144af80b994e19388dd5e/)
   Buildkite builds:
   [Finished] [`8601aac9` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/2770)
   [Failed] [`8601aac9` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/2804)
   [Finished] [`8601aac9` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/2768)
   [Finished] [`8601aac9` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/2795)
   [Finished] [`a1403d46` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/2769)
   [Failed] [`a1403d46` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/2803)
   [Finished] [`a1403d46` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/2767)
   [Finished] [`a1403d46` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/2794)
   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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org