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

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   Our team discovered that when function call `LocateZone("UTC")` is reached 
on Windows machine under certain conditions, it produces error:
   ```
   Cannot locate timezone 'UTC': Timezone database not found at 
"C:\Users\<username>\Downloads\tzdata"
   ```
   I am not familiar with the 
[`LocateZone`](https://github.com/apache/arrow/blob/403ba70f838dff125c46945948b544a61d12b27f/cpp/src/arrow/compute/kernels/temporal_internal.h#L47)
 function. Brief search shows `tzdata` is a python package and my machine 
actually has it, but I don't think the error has to do with `tzdata` package. 
   
   I am seeing this `Timezone database not found` error only when we are trying 
to convert the timestamp data to a char value, and the `arrow::TimestampType` 
has null timestamp data with UTC timezone.
   
   Simplified function call that triggered the error:
   ```
   // set up original array and cast options
   const std::shared_ptr<arrow::Array>& original_array; // null timestamp data 
with UTC timezone
   arrow::compute::CastOptions cast_options; // cast from timestamp to char type
   return arrow::compute::CallFunction("cast", {original_array}, &cast_options)
   ```
   
   The call stack:
   ```
   arrow.dll!arrow::compute::internal::LocateZone(const std::string & timezone) 
Line 47
        at 
C:\Users\AlinaLi\Documents\Arrow-Flight-SQL\bqarrow\cpp\src\arrow\compute\kernels\temporal_internal.h(47)
   arrow.dll!arrow::compute::internal::`anonymous 
namespace'::TemporalToStringCastFunctor<arrow::StringType,arrow::TimestampType>::ConvertZoned<std::chrono::duration<__int64,std::ratio<1,1000>>>(const
 arrow::ArraySpan & input, const std::string & timezone, arrow::StringBuilder * 
builder) Line 199
        at 
C:\Users\AlinaLi\Documents\Arrow-Flight-SQL\bqarrow\cpp\src\arrow\compute\kernels\scalar_cast_string.cc(199)
   arrow.dll!arrow::compute::internal::`anonymous 
namespace'::TemporalToStringCastFunctor<arrow::StringType,arrow::TimestampType>::Exec(arrow::compute::KernelContext
 * ctx, const arrow::compute::ExecSpan & batch, arrow::compute::ExecResult * 
out) Line 171
        at 
C:\Users\AlinaLi\Documents\Arrow-Flight-SQL\bqarrow\cpp\src\arrow\compute\kernels\scalar_cast_string.cc(171)
   arrow.dll!arrow::compute::detail::`anonymous 
namespace'::ScalarExecutor::ExecuteNonSpans(arrow::compute::detail::ExecListener
 * listener) Line 920
        at 
C:\Users\AlinaLi\Documents\Arrow-Flight-SQL\bqarrow\cpp\src\arrow\compute\exec.cc(920)
   arrow.dll!arrow::compute::detail::`anonymous 
namespace'::ScalarExecutor::Execute(const arrow::compute::ExecBatch & batch, 
arrow::compute::detail::ExecListener * listener) Line 810
        at 
C:\Users\AlinaLi\Documents\Arrow-Flight-SQL\bqarrow\cpp\src\arrow\compute\exec.cc(810)
   arrow.dll!arrow::compute::detail::FunctionExecutorImpl::Execute(const 
std::vector<arrow::Datum,std::allocator<arrow::Datum>> & args, __int64 
passed_length) Line 278
        at 
C:\Users\AlinaLi\Documents\Arrow-Flight-SQL\bqarrow\cpp\src\arrow\compute\function.cc(278)
   arrow.dll!arrow::compute::`anonymous namespace'::ExecuteInternal(const 
arrow::compute::Function & func, 
std::vector<arrow::Datum,std::allocator<arrow::Datum>> args, __int64 
passed_length, const arrow::compute::FunctionOptions * options, 
arrow::compute::ExecContext * ctx) Line 343
        at 
C:\Users\AlinaLi\Documents\Arrow-Flight-SQL\bqarrow\cpp\src\arrow\compute\function.cc(343)
   arrow.dll!arrow::compute::Function::Execute(const 
std::vector<arrow::Datum,std::allocator<arrow::Datum>> & args, const 
arrow::compute::FunctionOptions * options, arrow::compute::ExecContext * ctx) 
Line 350
        at 
C:\Users\AlinaLi\Documents\Arrow-Flight-SQL\bqarrow\cpp\src\arrow\compute\function.cc(350)
   arrow.dll!arrow::compute::internal::`anonymous 
namespace'::CastMetaFunction::ExecuteImpl(const 
std::vector<arrow::Datum,std::allocator<arrow::Datum>> & args, const 
arrow::compute::FunctionOptions * options, arrow::compute::ExecContext * ctx) 
Line 125
        at 
C:\Users\AlinaLi\Documents\Arrow-Flight-SQL\bqarrow\cpp\src\arrow\compute\cast.cc(125)
   arrow.dll!arrow::compute::MetaFunction::Execute(const 
std::vector<arrow::Datum,std::allocator<arrow::Datum>> & args, const 
arrow::compute::FunctionOptions * options, arrow::compute::ExecContext * ctx) 
Line 484
        at 
C:\Users\AlinaLi\Documents\Arrow-Flight-SQL\bqarrow\cpp\src\arrow\compute\function.cc(484)
   arrow.dll!arrow::compute::CallFunction(const std::string & func_name, const 
std::vector<arrow::Datum,std::allocator<arrow::Datum>> & args, const 
arrow::compute::FunctionOptions * options, arrow::compute::ExecContext * ctx) 
Line 1369
        at 
C:\Users\AlinaLi\Documents\Arrow-Flight-SQL\bqarrow\cpp\src\arrow\compute\exec.cc(1369)
   
arrow_flight_sql_odbc.dll!driver::flight_sql::GetConverter::__l27::<lambda_7>::operator()(const
 std::shared_ptr<arrow::Array> & original_array) Line 1036
   ```
   
   Any insights would be helpful, thanks!
   
   ### Component(s)
   
   C++, FlightRPC


-- 
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-unsubscr...@arrow.apache.org.apache.org

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

Reply via email to