Skip to content

Commit

Permalink
assorted cleanups (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAyd committed Jan 5, 2022
1 parent 0c5cd21 commit cfb2b74
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/reader.cc
Expand Up @@ -11,12 +11,12 @@
///
//===----------------------------------------------------------------------===//

#include "hyperarrow/reader.h"
#include "types.h"
#include <hyperarrow/reader.h>

#include <arrow/api.h>
#include <arrow/vendored/datetime.h>
#include <hyperapi/hyperapi.hpp>
#include <vector>

namespace hyperarrow {
static std::shared_ptr<arrow::Schema>
Expand Down
8 changes: 2 additions & 6 deletions src/writer.cc
Expand Up @@ -13,12 +13,12 @@
//===----------------------------------------------------------------------===//

#include "types.h"
#include <hyperarrow/writer.h>

#include <arrow/builder.h>
#include <arrow/compute/api.h>
#include <arrow/table.h>
#include <hyperapi/hyperapi.hpp>
#include <hyperarrow/writer.h>
#include <map>

namespace hyperarrow {
static const hyperapi::TableDefinition
Expand All @@ -29,10 +29,6 @@ createDefinitionFromSchema(std::shared_ptr<arrow::Table> table,
hyperapi::TableDefinition tableDef =
hyperapi::TableDefinition({schemaName, tableName});
for (const std::shared_ptr<arrow::Field> field : schema->fields()) {
// TODO: without these conversions can easily get an error like
// error: no matching function for call to
// 'hyperapi::TableDefinition::Column::Column(const string&,
// hyperapi::SqlType, bool)'
hyperapi::Name name = hyperapi::Name{field->name()};
hyperapi::Nullability nullable = field->nullable()
? hyperapi::Nullability::Nullable
Expand Down
6 changes: 4 additions & 2 deletions tests/test_roundtrip.cc
@@ -1,8 +1,10 @@
#define BOOST_TEST_MODULE hyperarrow_writer_tests
#include <arrow/api.h>
#include <boost/test/included/unit_test.hpp>

#include <hyperarrow/reader.h>
#include <hyperarrow/writer.h>

#include <arrow/api.h>
#include <boost/test/included/unit_test.hpp>
#include <stdio.h>

#define ABORT_ON_FAILURE(expr) \
Expand Down

0 comments on commit cfb2b74

Please sign in to comment.