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 {
arr.private_data = nullptr;
return arr;
}
};
/* ------------------------------------- SCHEMA CREATION ------------------------------------- */
template <typename T>
ArrowSchema create_primitive_schema() {
/* ------------------------------------- SCHEMA CREATION ------------------------------------- */
template <typename T>
ArrowSchema create_primitive_schema() {
std::logic_error("not implemented");
}
}
template <>
ArrowSchema create_primitive_schema<float>() {
template <>
ArrowSchema create_primitive_schema<float>() {
ArrowSchema schema;
schema.format = "f";
schema.name = nullptr;
......@@ -169,10 +171,10 @@ class ArrowChunkedArrayTest : public testing::Test {
schema.release = nullptr;
schema.private_data = nullptr;
return schema;
}
}
template <>
ArrowSchema create_primitive_schema<bool>() {
template <>
ArrowSchema create_primitive_schema<bool>() {
ArrowSchema schema;
schema.format = "b";
schema.name = nullptr;
......@@ -184,9 +186,9 @@ class ArrowChunkedArrayTest : public testing::Test {
schema.release = nullptr;
schema.private_data = nullptr;
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()));
for (size_t i = 0; i < arrays.size(); ++i) {
auto child = static_cast<ArrowSchema*>(malloc(sizeof(ArrowSchema)));
......@@ -205,8 +207,7 @@ class ArrowChunkedArrayTest : public testing::Test {
schema.release = &release_schema;
schema.private_data = nullptr;
return schema;
}
};
}
/* --------------------------------------------------------------------------------------------- */
/* 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