You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/14 13:44:10 UTC

[GitHub] [arrow] kou opened a new pull request, #14417: ARROW-18056: [Ruby] Add support for building Arrow::Table from {name: Arrow::Tensor}

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

   New #to_arrow_array protocol is also introduced.


-- 
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 #14417: ARROW-18056: [Ruby] Add support for building Arrow::Table from {name: Arrow::Tensor}

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #14417:
URL: https://github.com/apache/arrow/pull/14417#issuecomment-1280459118

   Benchmark runs are scheduled for baseline = 2f57194fd3347873c7a365e3a514bf87a78f75cb and contender = 913d9c0a9a1a4398ed5f56d713d586770b4f702c. 913d9c0a9a1a4398ed5f56d713d586770b4f702c 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/9274832ba62448c7810a0d009b8f7898...7c54dfa621224d1384a2a25764277553/)
   [Failed :arrow_down:0.0% :arrow_up:0.0%] [test-mac-arm](https://conbench.ursa.dev/compare/runs/8f7042c14ca94ecbaaa691d0bdfe6115...50861d16af9041978a34366e41778f69/)
   [Finished :arrow_down:0.0% :arrow_up:0.0%] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/b52a2a5f68fc43a6a97dc6ee347f11da...ae40405a4cd0426ab90ca0f7fe35e54e/)
   [Finished :arrow_down:0.25% :arrow_up:0.0%] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/ff177931daf0444b9ccccbc49e67fb73...5d901c07ab4d440895dd99b9b340bd5c/)
   Buildkite builds:
   [Finished] [`913d9c0a` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/1716)
   [Failed] [`913d9c0a` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/1735)
   [Finished] [`913d9c0a` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/1718)
   [Finished] [`913d9c0a` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/1729)
   [Finished] [`2f57194f` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/1715)
   [Failed] [`2f57194f` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/1734)
   [Finished] [`2f57194f` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/1717)
   [Finished] [`2f57194f` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/1728)
   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


[GitHub] [arrow] kou commented on a diff in pull request #14417: ARROW-18056: [Ruby] Add support for building Arrow::Table from {name: Arrow::Tensor}

Posted by GitBox <gi...@apache.org>.
kou commented on code in PR #14417:
URL: https://github.com/apache/arrow/pull/14417#discussion_r995841709


##########
ruby/red-arrow/lib/arrow/raw-table-converter.rb:
##########
@@ -35,7 +35,11 @@ def convert
         fields = []
         @values = []
         @raw_table.each do |name, array|
-          array = ArrayBuilder.build(array) if array.is_a?(::Array)
+          if array.respond_to?(:to_arrow_array)
+            array = array.to_arrow_array
+          elsif array.is_a?(::Array)

Review Comment:
   It's a good idea.
   I've added support for `#to_ary`.



-- 
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 #14417: ARROW-18056: [Ruby] Add support for building Arrow::Table from {name: Arrow::Tensor}

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #14417:
URL: https://github.com/apache/arrow/pull/14417#issuecomment-1280459448

   ['Python', 'R'] benchmarks have high level of regressions.
   [test-mac-arm](https://conbench.ursa.dev/compare/runs/8f7042c14ca94ecbaaa691d0bdfe6115...50861d16af9041978a34366e41778f69/)
   [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/b52a2a5f68fc43a6a97dc6ee347f11da...ae40405a4cd0426ab90ca0f7fe35e54e/)
   


-- 
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] kou commented on pull request #14417: ARROW-18056: [Ruby] Add support for building Arrow::Table from {name: Arrow::Tensor}

Posted by GitBox <gi...@apache.org>.
kou commented on PR #14417:
URL: https://github.com/apache/arrow/pull/14417#issuecomment-1279030545

   @mrkn What do you think about this approach?


-- 
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] mrkn commented on a diff in pull request #14417: ARROW-18056: [Ruby] Add support for building Arrow::Table from {name: Arrow::Tensor}

Posted by GitBox <gi...@apache.org>.
mrkn commented on code in PR #14417:
URL: https://github.com/apache/arrow/pull/14417#discussion_r995945190


##########
ruby/red-arrow/lib/arrow/raw-table-converter.rb:
##########
@@ -35,7 +35,11 @@ def convert
         fields = []
         @values = []
         @raw_table.each do |name, array|
-          array = ArrayBuilder.build(array) if array.is_a?(::Array)
+          if array.respond_to?(:to_arrow_array)
+            array = array.to_arrow_array
+          elsif array.is_a?(::Array)

Review Comment:
   Ok. LGTM!



-- 
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] kou merged pull request #14417: ARROW-18056: [Ruby] Add support for building Arrow::Table from {name: Arrow::Tensor}

Posted by GitBox <gi...@apache.org>.
kou merged PR #14417:
URL: https://github.com/apache/arrow/pull/14417


-- 
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] mrkn commented on a diff in pull request #14417: ARROW-18056: [Ruby] Add support for building Arrow::Table from {name: Arrow::Tensor}

Posted by GitBox <gi...@apache.org>.
mrkn commented on code in PR #14417:
URL: https://github.com/apache/arrow/pull/14417#discussion_r995818525


##########
ruby/red-arrow/lib/arrow/raw-table-converter.rb:
##########
@@ -35,7 +35,11 @@ def convert
         fields = []
         @values = []
         @raw_table.each do |name, array|
-          array = ArrayBuilder.build(array) if array.is_a?(::Array)
+          if array.respond_to?(:to_arrow_array)
+            array = array.to_arrow_array
+          elsif array.is_a?(::Array)

Review Comment:
   Do you think how to handle objects that respond to `to_ary` in addition to normal arrays?



-- 
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