Hi Zhiyuan,
Yes, you can see the following example which prints the names of the top
level fields.
orc::Reader * reader = ...
const orc::Type& type = reader->getType();
for (uint64_t i = 0; i != type.getSubtypeCount(); ++i)
{
std::cout << type.getFieldName(i) << std::endl;
}
Best,
Gang
On Tue, Nov 13, 2018 at 10:08 PM Zhiyuan Dong <[email protected]>
wrote:
> Hi,
>
> I am trying to use orc C++ api to retrieve column names in orc files.
>
> does ORC file contains column names ? for example, my column names are
> {"rowid", "region"}. Can I use orc C++ api to retrieve column names in orc
> file ? Please provide an example. Much appreciated !
>
> Best,
>
> Zhiyuan
>
>