You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "tikkss (via GitHub)" <gi...@apache.org> on 2025/05/03 02:07:55 UTC

[I] [C++] arrow::compute::Function::default_options() returns nullptr for "rank" on Ubuntu [arrow]

tikkss opened a new issue, #46299:
URL: https://github.com/apache/arrow/issues/46299

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   Steps to reproduce:
   
   Run the following program on Ubuntu (reproduced on Ubuntu 24.04 using the official packages):
   
   ```c++
   // g++ -g3 -O0 a.cc $(pkgconf --cflags --libs arrow) && ./a.out
   #include <stdio.h>
   #include <arrow/compute/api.h>
   
   int
   main(void)
   {
   	auto func = *(arrow::compute::GetFunctionRegistry()->GetFunction("rank"));
   	printf("%p\n", func->default_options()->options_type());
   	return 0;
   }
   ```
   
   Expected result:
   
   A valid pointer to a FunctionOptions object, specifically arrow::compute::RankOptions.
   
   Actual result:
   
   Returns `nullptr`.
   
   Environments:
   
   * Arrow version: 20.0.0
   * OS: Ubuntu 24.04 (Debian noble)
   * This does not reproduce on other platforms.
   
   
   ### Component(s)
   
   C++


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] arrow::compute::Function::default_options() returns nullptr for "rank" on Ubuntu [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #46299:
URL: https://github.com/apache/arrow/issues/46299#issuecomment-2848537505

   It seems that `arrow::compute::RankOptions::Defaults()` may be called https://github.com/apache/arrow/blob/81bb98853c5c84132dc1ae9cd1be8507bdd0800a/cpp/src/arrow/compute/kernels/vector_rank.cc#L386
    before `arrow::compute::internal::kRankOptionsType` is initialized https://github.com/apache/arrow/blob/81bb98853c5c84132dc1ae9cd1be8507bdd0800a/cpp/src/arrow/compute/api_vector.cc#L154-L157 .
   
   `arrow::compute::internal::kRankOptionsType` is used in `arrow::compute::RankOptions::RankOptions()` that is used by `RankOptions::Defaults()`:
   
   https://github.com/apache/arrow/blob/81bb98853c5c84132dc1ae9cd1be8507bdd0800a/cpp/src/arrow/compute/api_vector.cc#L237
   
   @pitrou @bkietz Do you know whether there is the static variable initialization order specification for C++ or not?


-- 
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: [I] [C++] arrow::compute::Function::default_options() returns nullptr for "rank" on Ubuntu [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou closed issue #46299: [C++] arrow::compute::Function::default_options() returns nullptr for "rank" on Ubuntu
URL: https://github.com/apache/arrow/issues/46299


-- 
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: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] arrow::compute::Function::default_options() returns nullptr for "rank" on Ubuntu [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #46299:
URL: https://github.com/apache/arrow/issues/46299#issuecomment-2867905540

   Issue resolved by pull request 46303
   https://github.com/apache/arrow/pull/46303


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