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/04/16 10:14:47 UTC

[GitHub] [arrow] okadakk opened a new pull request, #12904: ARROW-15936 [Ruby] Add test for Arrow::DictionaryArray#raw_records

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

   I added test for Arrow::DictionaryArray#raw_records.
   


-- 
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 #12904: ARROW-15936 [Ruby] Add test for Arrow::DictionaryArray#raw_records

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #12904:
URL: https://github.com/apache/arrow/pull/12904#issuecomment-1100629182

   :warning: Ticket **has not been started in JIRA**, please click 'Start Progress'.


-- 
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 #12904: ARROW-15936 [Ruby] Add test for Arrow::DictionaryArray#raw_records

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

   Benchmark runs are scheduled for baseline = dc39f83e2f9d05b0fcea1ad8ed4ed9e07da7bef0 and contender = 79810a54913d328f06c29395ec5a086b3aa90fcc. 79810a54913d328f06c29395ec5a086b3aa90fcc 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/9acf4b5cd6fe4f8d8539b78ac55a0ea3...f9c03f20a8ee42ce96e393dc935c0c3c/)
   [Failed :arrow_down:1.05% :arrow_up:0.0%] [test-mac-arm](https://conbench.ursa.dev/compare/runs/55c6f23a3dcb4c20a616a108c47ad345...7849931ecaf7463ca59683d8f14e03eb/)
   [Failed :arrow_down:0.37% :arrow_up:0.0%] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/69f4a27b959147c489dc11a6d5cdddfd...4f8f547283ee4bf2811ff6de18fa2c45/)
   [Finished :arrow_down:0.16% :arrow_up:0.04%] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/085c7b1c3f034465990f2b74b5e337b1...4668add989f34030813e6bc1d5354c55/)
   Buildkite builds:
   [Finished] [`79810a54` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/792)
   [Failed] [`79810a54` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/789)
   [Failed] [`79810a54` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/779)
   [Finished] [`79810a54` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/795)
   [Finished] [`dc39f83e` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/791)
   [Failed] [`dc39f83e` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/788)
   [Failed] [`dc39f83e` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/778)
   [Finished] [`dc39f83e` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/794)
   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] github-actions[bot] commented on pull request #12904: ARROW-15936 [Ruby] Add test for Arrow::DictionaryArray#raw_records

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #12904:
URL: https://github.com/apache/arrow/pull/12904#issuecomment-1100629178

   https://issues.apache.org/jira/browse/ARROW-15936


-- 
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 #12904: ARROW-15936 [Ruby] Add test for Arrow::DictionaryArray#raw_records

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

   No problem! But please mention me when a pull request can be reviewed again.


-- 
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 #12904: ARROW-15936 [Ruby] Add test for Arrow::DictionaryArray#raw_records

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


##########
ruby/red-arrow/test/raw-records/test-dictionary-array.rb:
##########
@@ -0,0 +1,332 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+module RawRecordsDictionaryArrayTests
+  def build_schema(dictionary)
+    Arrow::Schema.new({
+      column: {
+        type: :dictionary,
+        index_data_type: :int32,
+        value_data_type: dictionary.value_data_type,
+        ordered: false,
+      },
+    })
+  end
+
+  def build_record_batch(dictionary, records)
+    Arrow::RecordBatch.new(build_schema(dictionary),
+                           records.size,
+                          [dictionary.dictionary_encode])

Review Comment:
   ```suggestion
                              [dictionary.dictionary_encode])
   ```



##########
ruby/red-arrow/test/raw-records/test-dictionary-array.rb:
##########
@@ -0,0 +1,332 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+module RawRecordsDictionaryArrayTests
+  def build_schema(dictionary)
+    Arrow::Schema.new({
+      column: {
+        type: :dictionary,
+        index_data_type: :int32,
+        value_data_type: dictionary.value_data_type,
+        ordered: false,
+      },
+    })
+  end
+
+  def build_record_batch(dictionary, records)

Review Comment:
   Umm. This `dictionary` isn't a dictionary.
   
   For example, `Arrow::NullArray.new(records.flatten)` in `build(Arrow::NullArray.new(records.flatten), records)` isn't a dictionary.
   
   How about something like the following?
   
   ```ruby
   def build_record_batch(array)
     dictionary = array.dictionary_encode
     schema = Arrow::Schema.new(column: dictionary.value_data_type)
     Arrow::RecordBatch.new(schema, array.length, [dictionary])
   end
   ```
   
   ```ruby
   target = build(Arrow::NullArray.new(records.collect(&:first)))
   ```
   



-- 
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 closed pull request #12904: ARROW-15936 [Ruby] Add test for Arrow::DictionaryArray#raw_records

Posted by GitBox <gi...@apache.org>.
kou closed pull request #12904: ARROW-15936 [Ruby] Add test for Arrow::DictionaryArray#raw_records
URL: https://github.com/apache/arrow/pull/12904


-- 
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] okadakk commented on pull request #12904: ARROW-15936 [Ruby] Add test for Arrow::DictionaryArray#raw_records

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

   thanks! Sorry for the late reaction...


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