jtristano opened a new issue, #43670:
URL: https://github.com/apache/arrow/issues/43670
### Describe the usage question you have. Please include as many useful
details as possible.
I'm using a CMake that depends on conan packages for other libraries.
The default arrow installs didnt mix well with the conan pulls so I added
arrow to my conan.
I was able to run a simple unit test up to the point of reading a snappy
encoded parquet file and received this error
```
Error reading table: NotImplemented: Support for codec 'snappy' not built
```
Here's the test
```
#include <gtest/gtest.h>
#include <arrow/api.h>
#include <arrow/io/api.h>
#include <arrow/ipc/api.h>
#include <arrow/util/logging.h>
#include <parquet/arrow/reader.h>
#include <iostream>
TEST(ArrowTests, TestArrow)
{
std::string path_to_file = "myfile.parquet";
arrow::MemoryPool* pool = arrow::default_memory_pool();
std::shared_ptr<arrow::io::RandomAccessFile> input;
auto result = arrow::io::ReadableFile::Open(path_to_file);
std::cout << "Readable file result.ok() = " << result.ok() << std::endl;
ASSERT_TRUE(result.ok());
input = *result;
// Open Parquet file reader
std::unique_ptr<parquet::arrow::FileReader> arrow_reader;
auto status = parquet::arrow::OpenFile(input, pool, &arrow_reader);
std::cout << "parquet file result.ok() = " << result.ok() << std::endl;
ASSERT_TRUE(status.ok());
// Initialize Arrow logging
arrow::util::ArrowLog::StartArrowLog("arrow_log",
arrow::util::ArrowLogLevel::ARROW_DEBUG);
arrow::util::ArrowLog::InstallFailureSignalHandler();
std::shared_ptr<arrow::Table> table;
status = arrow_reader->ReadTable(&table);
// Log the status message
if (!status.ok()) {
std::cerr << "Error reading table: " << status.ToString() <<
std::endl;
}
std::cout << "table read result.ok() = " << status.ok() << std::endl;
ASSERT_TRUE(status.ok());
// Shutdown Arrow logging
arrow::util::ArrowLog::UninstallSignalAction();
arrow::util::ArrowLog::ShutDownArrowLog();
}
```
### 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]