'how to convert a buffer to arrow parquet table in c++

I read a parquet file from remote, so get the binary file, which is a buffer. (unsigned char *buffer) How can I convert it to readable table?

I can save the buffer to my local disk, for example

std::ofstream outFile;
outFile.open("../test.parquet", std::ios::binary);
for (int i = 0; i < file_size; i++)
{
    outFile << buffer[i];
}

Then read the parquet file to parse it. How can I convert the buffer to a readable table directly? I can use arrow::Buffer to store the buffer, but don't know how to parse it.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source