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 2021/12/27 22:21:44 UTC
[GitHub] [arrow] kou opened a new pull request #12041: ARROW-15203: [GLib] garrow_struct_scalar_get_value() for scalar from C++ returns value
kou opened a new pull request #12041:
URL: https://github.com/apache/arrow/pull/12041
We need to convert C++ scalars lazy because there is no change to
convert C++ scalars to GLib scalars.
--
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] edponce commented on a change in pull request #12041: ARROW-15203: [GLib] garrow_struct_scalar_get_value() for scalar from C++ returns value
Posted by GitBox <gi...@apache.org>.
edponce commented on a change in pull request #12041:
URL: https://github.com/apache/arrow/pull/12041#discussion_r776588154
##########
File path: c_glib/arrow-glib/scalar.cpp
##########
@@ -2039,6 +2039,16 @@ GList *
garrow_struct_scalar_get_value(GArrowStructScalar *scalar)
{
auto priv = GARROW_STRUCT_SCALAR_GET_PRIVATE(scalar);
+ if (!priv->value) {
+ auto arrow_scalar =
+ std::static_pointer_cast<arrow::StructScalar>(
+ garrow_scalar_get_raw(GARROW_SCALAR(scalar)));
+ for (auto arrow_element : arrow_scalar->value) {
+ priv->value = g_list_prepend(priv->value,
+ garrow_scalar_new_raw(&arrow_element));
+ }
+ priv->value = g_list_reverse(priv->value);
+ }
Review comment:
Why prepend and then reverse instead of only appending?
--
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 #12041: ARROW-15203: [GLib] garrow_struct_scalar_get_value() for scalar from C++ returns value
Posted by GitBox <gi...@apache.org>.
kou closed pull request #12041:
URL: https://github.com/apache/arrow/pull/12041
--
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 edited a comment on pull request #12041: ARROW-15203: [GLib] garrow_struct_scalar_get_value() for scalar from C++ returns value
Posted by GitBox <gi...@apache.org>.
ursabot edited a comment on pull request #12041:
URL: https://github.com/apache/arrow/pull/12041#issuecomment-1003400148
Benchmark runs are scheduled for baseline = 1a16c8981f5fd01f486d0108fc430e3edb157bd2 and contender = 6f47ba3d01f49bce29ee0395a0b45ad5be17db6b. 6f47ba3d01f49bce29ee0395a0b45ad5be17db6b 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/0b789fc19eaa47fbb6736398b8af8d30...1faf8588743949c285a63ab4ece262b1/)
[Scheduled] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/c8c211ddbe14439bb870dc65930453d1...047711a683864d749bfb35392808572c/)
[Scheduled] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/10695a3482594951a893c86cb338cd19...52dcded2c47d4d62a37d1c979f97faf1/)
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python. Runs only benchmarks with cloud = True
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 #12041: ARROW-15203: [GLib] garrow_struct_scalar_get_value() for scalar from C++ returns value
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #12041:
URL: https://github.com/apache/arrow/pull/12041#issuecomment-1001782225
--
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 change in pull request #12041: ARROW-15203: [GLib] garrow_struct_scalar_get_value() for scalar from C++ returns value
Posted by GitBox <gi...@apache.org>.
kou commented on a change in pull request #12041:
URL: https://github.com/apache/arrow/pull/12041#discussion_r776869489
##########
File path: c_glib/arrow-glib/scalar.cpp
##########
@@ -2039,6 +2039,16 @@ GList *
garrow_struct_scalar_get_value(GArrowStructScalar *scalar)
{
auto priv = GARROW_STRUCT_SCALAR_GET_PRIVATE(scalar);
+ if (!priv->value) {
+ auto arrow_scalar =
+ std::static_pointer_cast<arrow::StructScalar>(
+ garrow_scalar_get_raw(GARROW_SCALAR(scalar)));
+ for (auto arrow_element : arrow_scalar->value) {
+ priv->value = g_list_prepend(priv->value,
+ garrow_scalar_new_raw(&arrow_element));
+ }
+ priv->value = g_list_reverse(priv->value);
+ }
Review comment:
This is a idiom in GLib. This is for performance but this will not be needed here.
`GList` is a linked list. `g_list_append()` is O(N) (N is the number of elements). `g_list_prepend()` is O(1). `g_list_reverse()` is O(N).
--
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 edited a comment on pull request #12041: ARROW-15203: [GLib] garrow_struct_scalar_get_value() for scalar from C++ returns value
Posted by GitBox <gi...@apache.org>.
ursabot edited a comment on pull request #12041:
URL: https://github.com/apache/arrow/pull/12041#issuecomment-1003400148
Benchmark runs are scheduled for baseline = 1a16c8981f5fd01f486d0108fc430e3edb157bd2 and contender = 6f47ba3d01f49bce29ee0395a0b45ad5be17db6b. 6f47ba3d01f49bce29ee0395a0b45ad5be17db6b 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/0b789fc19eaa47fbb6736398b8af8d30...1faf8588743949c285a63ab4ece262b1/)
[Failed] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/c8c211ddbe14439bb870dc65930453d1...047711a683864d749bfb35392808572c/)
[Failed] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/10695a3482594951a893c86cb338cd19...52dcded2c47d4d62a37d1c979f97faf1/)
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python. Runs only benchmarks with cloud = True
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 pull request #12041: ARROW-15203: [GLib] garrow_struct_scalar_get_value() for scalar from C++ returns value
Posted by GitBox <gi...@apache.org>.
kou commented on pull request #12041:
URL: https://github.com/apache/arrow/pull/12041#issuecomment-1003185213
+1
--
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 #12041: ARROW-15203: [GLib] garrow_struct_scalar_get_value() for scalar from C++ returns value
Posted by GitBox <gi...@apache.org>.
ursabot commented on pull request #12041:
URL: https://github.com/apache/arrow/pull/12041#issuecomment-1003400148
Benchmark runs are scheduled for baseline = 1a16c8981f5fd01f486d0108fc430e3edb157bd2 and contender = 6f47ba3d01f49bce29ee0395a0b45ad5be17db6b. 6f47ba3d01f49bce29ee0395a0b45ad5be17db6b is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Scheduled] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/0b789fc19eaa47fbb6736398b8af8d30...1faf8588743949c285a63ab4ece262b1/)
[Scheduled] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/c8c211ddbe14439bb870dc65930453d1...047711a683864d749bfb35392808572c/)
[Scheduled] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/10695a3482594951a893c86cb338cd19...52dcded2c47d4d62a37d1c979f97faf1/)
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python. Runs only benchmarks with cloud = True
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] ursabot edited a comment on pull request #12041: ARROW-15203: [GLib] garrow_struct_scalar_get_value() for scalar from C++ returns value
Posted by GitBox <gi...@apache.org>.
ursabot edited a comment on pull request #12041:
URL: https://github.com/apache/arrow/pull/12041#issuecomment-1003400148
Benchmark runs are scheduled for baseline = 1a16c8981f5fd01f486d0108fc430e3edb157bd2 and contender = 6f47ba3d01f49bce29ee0395a0b45ad5be17db6b. 6f47ba3d01f49bce29ee0395a0b45ad5be17db6b 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/0b789fc19eaa47fbb6736398b8af8d30...1faf8588743949c285a63ab4ece262b1/)
[Scheduled] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/c8c211ddbe14439bb870dc65930453d1...047711a683864d749bfb35392808572c/)
[Failed] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/10695a3482594951a893c86cb338cd19...52dcded2c47d4d62a37d1c979f97faf1/)
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python. Runs only benchmarks with cloud = True
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