You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "egolearner (via GitHub)" <gi...@apache.org> on 2025/07/29 11:46:27 UTC
[PR] MINOR: [C++] initialize arrow::compute in execution_plan_documentation_examples [arrow]
egolearner opened a new pull request, #47227:
URL: https://github.com/apache/arrow/pull/47227
### Rationale for this change
fix example running error
```
****** Scan Example ******
Error occurred: No function registered with name: make_struct
```
### What changes are included in this PR?
call arrow::compute::initialize ahead
### Are these changes tested?
yes
### Are there any user-facing changes?
no
--
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
Re: [PR] GH-47243: [C++] Initialize arrow::compute in execution_plan_documentation_examples [arrow]
Posted by "egolearner (via GitHub)" <gi...@apache.org>.
egolearner commented on code in PR #47227:
URL: https://github.com/apache/arrow/pull/47227#discussion_r2257612147
##########
cpp/examples/arrow/execution_plan_documentation_examples.cc:
##########
@@ -827,12 +827,17 @@ enum ExampleMode {
int main(int argc, char** argv) {
if (argc < 3) {
// Fake success for CI purposes.
+ std::cout << "Usage: " << argv[0] << " base_save_path mode" << std::endl;
return EXIT_SUCCESS;
}
std::string base_save_path = argv[1];
int mode = std::atoi(argv[2]);
- arrow::Status status;
+ arrow::Status status = arrow::compute::Initialize();
+ if (!status.ok()) {
+ std::cout << "Error occurred: " << status.message() << std::endl;
+ return EXIT_FAILURE;
+ }
Review Comment:
It seems other examples already have necessary `arrow::compute::Initialize()` call.
--
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
Re: [PR] GH-47243: [C++] Initialize arrow::compute in execution_plan_documentation_examples [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #47227:
URL: https://github.com/apache/arrow/pull/47227#discussion_r2262362893
##########
cpp/examples/arrow/execution_plan_documentation_examples.cc:
##########
@@ -827,12 +827,17 @@ enum ExampleMode {
int main(int argc, char** argv) {
if (argc < 3) {
// Fake success for CI purposes.
+ std::cout << "Usage: " << argv[0] << " base_save_path mode" << std::endl;
Review Comment:
```suggestion
std::cout << "Usage: " << argv[0] << " base_save_path mode" << std::endl;
// Fake success for CI purposes.
```
--
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
Re: [PR] GH-47243: [C++] Initialize arrow::compute in execution_plan_documentation_examples [arrow]
Posted by "egolearner (via GitHub)" <gi...@apache.org>.
egolearner commented on PR #47227:
URL: https://github.com/apache/arrow/pull/47227#issuecomment-3224601526
#47433 is created @raulcd
--
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
Re: [PR] GH-47243: [C++] Initialize arrow::compute in execution_plan_documentation_examples [arrow]
Posted by "egolearner (via GitHub)" <gi...@apache.org>.
egolearner commented on code in PR #47227:
URL: https://github.com/apache/arrow/pull/47227#discussion_r2253998122
##########
cpp/examples/arrow/dataset_documentation_example.cc:
##########
@@ -20,6 +20,7 @@
#include <arrow/api.h>
#include <arrow/compute/cast.h>
+#include <arrow/compute/initialize.h>
Review Comment:
done
--
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
Re: [PR] GH-47243: [C++] Initialize arrow::compute in execution_plan_documentation_examples [arrow]
Posted by "egolearner (via GitHub)" <gi...@apache.org>.
egolearner commented on PR #47227:
URL: https://github.com/apache/arrow/pull/47227#issuecomment-3184496643
rollback dataset-documentation-example
--
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
Re: [PR] GH-47243: [C++] Initialize arrow::compute in execution_plan_documentation_examples [arrow]
Posted by "egolearner (via GitHub)" <gi...@apache.org>.
egolearner commented on code in PR #47227:
URL: https://github.com/apache/arrow/pull/47227#discussion_r2257609775
##########
cpp/examples/arrow/execution_plan_documentation_examples.cc:
##########
@@ -827,12 +827,17 @@ enum ExampleMode {
int main(int argc, char** argv) {
if (argc < 3) {
// Fake success for CI purposes.
+ std::cout << "Usage: " << argv[0] << " base_save_path mode" << std::endl;
Review Comment:
Not required.
Although it's more friendly to print usage information if no arguments are provided.
--
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
Re: [PR] GH-47243: [C++] initialize arrow::compute in execution_plan_documentation_examples [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #47227:
URL: https://github.com/apache/arrow/pull/47227#issuecomment-3138481755
:warning: GitHub issue #47243 **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
Re: [PR] GH-47243: [C++] initialize arrow::compute in execution_plan_documentation_examples [arrow]
Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd commented on code in PR #47227:
URL: https://github.com/apache/arrow/pull/47227#discussion_r2251328756
##########
cpp/examples/arrow/dataset_documentation_example.cc:
##########
@@ -20,6 +20,7 @@
#include <arrow/api.h>
#include <arrow/compute/cast.h>
+#include <arrow/compute/initialize.h>
Review Comment:
Let's use the exposed api header instead of the internal initialize.
```suggestion
#include <arrow/compute/api.h>
```
--
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
Re: [PR] GH-47243: [C++] Initialize arrow::compute in execution_plan_documentation_examples [arrow]
Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd merged PR #47227:
URL: https://github.com/apache/arrow/pull/47227
--
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
Re: [PR] GH-47243: [C++] Initialize arrow::compute in execution_plan_documentation_examples [arrow]
Posted by "rok (via GitHub)" <gi...@apache.org>.
rok commented on code in PR #47227:
URL: https://github.com/apache/arrow/pull/47227#discussion_r2256609402
##########
cpp/examples/arrow/execution_plan_documentation_examples.cc:
##########
@@ -827,12 +827,17 @@ enum ExampleMode {
int main(int argc, char** argv) {
if (argc < 3) {
// Fake success for CI purposes.
+ std::cout << "Usage: " << argv[0] << " base_save_path mode" << std::endl;
return EXIT_SUCCESS;
}
std::string base_save_path = argv[1];
int mode = std::atoi(argv[2]);
- arrow::Status status;
+ arrow::Status status = arrow::compute::Initialize();
+ if (!status.ok()) {
+ std::cout << "Error occurred: " << status.message() << std::endl;
+ return EXIT_FAILURE;
+ }
Review Comment:
Do all examples need initialization? If not you could put `ARROW_RETURN_NOT_OK(arrow::compute::Initialize());` into the ones that do. Otherwise this is good.
##########
cpp/examples/arrow/execution_plan_documentation_examples.cc:
##########
@@ -827,12 +827,17 @@ enum ExampleMode {
int main(int argc, char** argv) {
if (argc < 3) {
// Fake success for CI purposes.
+ std::cout << "Usage: " << argv[0] << " base_save_path mode" << std::endl;
Review Comment:
Is this line required?
--
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
Re: [PR] GH-47243: [C++] Initialize arrow::compute in execution_plan_documentation_examples [arrow]
Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #47227:
URL: https://github.com/apache/arrow/pull/47227#issuecomment-3228522613
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 205924397034f7bd4ecc06660a9adf0c37604ce8.
There weren't enough matching historic benchmark results to make a call on whether there were regressions.
The [full Conbench report](https://github.com/apache/arrow/runs/49012823035) has more details.
--
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
Re: [PR] GH-47243: [C++] Initialize arrow::compute in execution_plan_documentation_examples [arrow]
Posted by "egolearner (via GitHub)" <gi...@apache.org>.
egolearner commented on PR #47227:
URL: https://github.com/apache/arrow/pull/47227#issuecomment-3184423754
> oh! that's why they were not executed on CI, thanks for noticing @kou!
>
> The failure on Appveyor seems related:
>
> ```
> 120/120 Test #114: dataset-documentation-example ................***Failed 2.52 sec
> IOError: Cannot create directory '//C/Users/appveyor/AppData/Local/Temp/1/parquet_dataset'. Detail: [Windows error 53] The network path was not found.
> ```
@raulcd
Should I rollback dataset-documentation-example or default to create dataset in current directory and see if Appveyor passes?
--
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
Re: [PR] GH-47243: [C++] Initialize arrow::compute in execution_plan_documentation_examples [arrow]
Posted by "egolearner (via GitHub)" <gi...@apache.org>.
egolearner commented on code in PR #47227:
URL: https://github.com/apache/arrow/pull/47227#discussion_r2273347091
##########
cpp/examples/arrow/execution_plan_documentation_examples.cc:
##########
@@ -827,12 +827,17 @@ enum ExampleMode {
int main(int argc, char** argv) {
if (argc < 3) {
// Fake success for CI purposes.
+ std::cout << "Usage: " << argv[0] << " base_save_path mode" << std::endl;
Review Comment:
default argument logic added.
PTAL
--
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