It's a very simple example. I am trying to extract the TimeUnit::type from the DataType.
array = arrow::Array *array
auto a = static_cast<arrow::Date64Array*>(array);
arrow::TimeUnit::type unit = a->type()->unit();
I didn't find any specific in the Docs but the type.h
says that there should be a public .Unit or .unit() but I can't find any of them. Did I miss something?
My C++ is a little bit slow, and partially looks like
arrow::DateUnit
is not exported in the C++ api for whatever reason.As a bonus I was trying to do this for timestamp (and other times) as well, which is slightly different since they return
arrow::TimeUnit::type
instead: