Commit e461e868 authored by Jeff Daily's avatar Jeff Daily
Browse files

Fix error in cpp_tests/test_arrow.cpp.

error: explicit specialization in non-namespace scope ‘class ArrowChunkedArrayTest’
parent 61ec4f1a
...@@ -148,16 +148,18 @@ class ArrowChunkedArrayTest : public testing::Test { ...@@ -148,16 +148,18 @@ class ArrowChunkedArrayTest : public testing::Test {
arr.private_data = nullptr; arr.private_data = nullptr;
return arr; return arr;
} }
};
/* ------------------------------------- SCHEMA CREATION ------------------------------------- */
template <typename T> /* ------------------------------------- SCHEMA CREATION ------------------------------------- */
ArrowSchema create_primitive_schema() {
template <typename T>
ArrowSchema create_primitive_schema() {
std::logic_error("not implemented"); std::logic_error("not implemented");
} }
template <> template <>
ArrowSchema create_primitive_schema<float>() { ArrowSchema create_primitive_schema<float>() {
ArrowSchema schema; ArrowSchema schema;
schema.format = "f"; schema.format = "f";
schema.name = nullptr; schema.name = nullptr;
...@@ -169,10 +171,10 @@ class ArrowChunkedArrayTest : public testing::Test { ...@@ -169,10 +171,10 @@ class ArrowChunkedArrayTest : public testing::Test {
schema.release = nullptr; schema.release = nullptr;
schema.private_data = nullptr; schema.private_data = nullptr;
return schema; return schema;
} }
template <> template <>
ArrowSchema create_primitive_schema<bool>() { ArrowSchema create_primitive_schema<bool>() {
ArrowSchema schema; ArrowSchema schema;
schema.format = "b"; schema.format = "b";
schema.name = nullptr; schema.name = nullptr;
...@@ -184,9 +186,9 @@ class ArrowChunkedArrayTest : public testing::Test { ...@@ -184,9 +186,9 @@ class ArrowChunkedArrayTest : public testing::Test {
schema.release = nullptr; schema.release = nullptr;
schema.private_data = nullptr; schema.private_data = nullptr;
return schema; return schema;
} }
ArrowSchema create_nested_schema(const std::vector<ArrowSchema*>& arrays) { ArrowSchema create_nested_schema(const std::vector<ArrowSchema*>& arrays) {
auto children = static_cast<ArrowSchema**>(malloc(sizeof(ArrowSchema*) * arrays.size())); auto children = static_cast<ArrowSchema**>(malloc(sizeof(ArrowSchema*) * arrays.size()));
for (size_t i = 0; i < arrays.size(); ++i) { for (size_t i = 0; i < arrays.size(); ++i) {
auto child = static_cast<ArrowSchema*>(malloc(sizeof(ArrowSchema))); auto child = static_cast<ArrowSchema*>(malloc(sizeof(ArrowSchema)));
...@@ -205,8 +207,7 @@ class ArrowChunkedArrayTest : public testing::Test { ...@@ -205,8 +207,7 @@ class ArrowChunkedArrayTest : public testing::Test {
schema.release = &release_schema; schema.release = &release_schema;
schema.private_data = nullptr; schema.private_data = nullptr;
return schema; return schema;
} }
};
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
/* TESTS */ /* TESTS */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment