You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "westonpace (via GitHub)" <gi...@apache.org> on 2023/02/02 03:44:49 UTC

[GitHub] [arrow] westonpace opened a new pull request, #33994: GH-33971: [C++] Fix AdaptiveIntBuilder to always populate data buffer

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

   If the AdaptiveIntBuilder was empty it would yield a null for the values buffer.  The byte_size.h utilities were not expecting this which led to the error reported in the issue.
   
   Example:
   
   ```
   >>> pa.array([], type=pa.dictionary(pa.int32(), pa.string())).buffers()
   [None, None]
   ```


-- 
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] westonpace commented on a diff in pull request #33994: GH-33971: [C++] Fix AdaptiveIntBuilder to always populate data buffer

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


##########
cpp/src/arrow/array/array_dict_test.cc:
##########
@@ -157,6 +157,18 @@ TYPED_TEST(TestDictionaryBuilder, MakeBuilder) {
   AssertArraysEqual(expected, *result);
 }
 
+TYPED_TEST(TestDictionaryBuilder, Empty) {
+  DictionaryBuilder<TypeParam> dictionary_builder;
+  ASSERT_OK_AND_ASSIGN(std::shared_ptr<Array> empty_arr, dictionary_builder.Finish());
+  std::shared_ptr<DictionaryArray> empty_dict_arr =
+      std::static_pointer_cast<DictionaryArray>(empty_arr);

Review Comment:
   Fixed in https://github.com/apache/arrow/pull/33994/commits/c2d0a3631d157698fb9cc78ae1bb8db852b92085#diff-b6db8f2d68f397dbb43cd18c35eaf00d28fea796dd870d7019ceafcf04eda7e7R164



-- 
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 #33994: GH-33971: [C++] Fix AdaptiveIntBuilder to always populate data buffer

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

   Benchmark runs are scheduled for baseline = 4e89d9a84f397a41d9887decbf782a86793e2f18 and contender = a6ace685339a8f7fb786af66ef9328b7b3f7eb68. a6ace685339a8f7fb786af66ef9328b7b3f7eb68 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Failed :arrow_down:0.0% :arrow_up:0.0%] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/094a4b0c9e4e4bf5850c2f6e5de1dfac...0d9bc5f894a44756bef7fffe9750ff5f/)
   [Failed :arrow_down:0.15% :arrow_up:0.0%] [test-mac-arm](https://conbench.ursa.dev/compare/runs/a80f84ee5df04bf9aa4b817ded10cd67...20421597d60b424d88bc3b0fcf35e040/)
   [Failed :arrow_down:0.0% :arrow_up:0.0%] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/3b20824d67c1438cbd500127c20b9602...d17637e6d31a49b48d8bbbb06cc649c2/)
   [Finished :arrow_down:1.17% :arrow_up:0.06%] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/c8c124735ac84b4bb33410a2ab8b8d5b...0bb5f29acadf4c31bb0d08d5ad78fc22/)
   Buildkite builds:
   [Failed] [`a6ace685` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/2343)
   [Failed] [`a6ace685` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/2371)
   [Failed] [`a6ace685` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/2341)
   [Finished] [`a6ace685` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/2362)
   [Failed] [`4e89d9a8` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/2342)
   [Failed] [`4e89d9a8` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/2370)
   [Failed] [`4e89d9a8` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/2340)
   [Finished] [`4e89d9a8` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/2361)
   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 #33994: GH-33971: [C++] Fix AdaptiveIntBuilder to always populate data buffer

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

   * Closes: #33971


-- 
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] westonpace merged pull request #33994: GH-33971: [C++] Fix AdaptiveIntBuilder to always populate data buffer

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


-- 
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] pitrou commented on a diff in pull request #33994: GH-33971: [C++] Fix AdaptiveIntBuilder to always populate data buffer

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


##########
cpp/src/arrow/array/array_dict_test.cc:
##########
@@ -157,6 +157,18 @@ TYPED_TEST(TestDictionaryBuilder, MakeBuilder) {
   AssertArraysEqual(expected, *result);
 }
 
+TYPED_TEST(TestDictionaryBuilder, Empty) {
+  DictionaryBuilder<TypeParam> dictionary_builder;
+  ASSERT_OK_AND_ASSIGN(std::shared_ptr<Array> empty_arr, dictionary_builder.Finish());
+  std::shared_ptr<DictionaryArray> empty_dict_arr =
+      std::static_pointer_cast<DictionaryArray>(empty_arr);

Review Comment:
   `checked_pointer_cast` here?



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