-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated C++ client code, tests, and examples. (#2818)
* Updated C++ client code, tests, and examples. * Move third-party flatbuffers to a different directory; write a README.md file; make it clear how I patched flatbuffers.
- Loading branch information
Showing
92 changed files
with
2,105 additions
and
2,282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...lient/deephaven/client/include/private/deephaven/client/arrowutil/arrow_value_converter.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Copyright (c) 2016-2022 Deephaven Data Labs and Patent Pending | ||
*/ | ||
#pragma once | ||
|
||
#include <string> | ||
#include <arrow/type.h> | ||
#include <arrow/util/string_view.h> | ||
#include <deephaven/client/types.h> | ||
|
||
namespace deephaven::client::arrowutil { | ||
class ArrowValueConverter { | ||
public: | ||
// "convert" function for anything except string_view is the identity function. | ||
template<typename SRC, typename DEST> | ||
static void convert(SRC src, DEST *dest) { | ||
*dest = src; | ||
} | ||
|
||
// "convert" function for string_view is std::string | ||
static void convert(arrow::util::string_view sv, std::string *dest) { | ||
dest->clear(); | ||
dest->append(sv.data(), sv.size()); | ||
} | ||
|
||
static void convert(int64_t src, deephaven::client::DateTime *dest) { | ||
*dest = deephaven::client::DateTime::fromNanos(src); | ||
} | ||
}; | ||
} // namespace deephaven::client::arrowutil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.