Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
fix timestamp in native side (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
rui-mo authored Jun 25, 2021
1 parent 8fe1253 commit 343ea32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,8 @@ extern "C" void MakeCodeGen(arrow::compute::ExecContext *ctx,
std::stringstream codes_ss;
for (int i = 0; i < output_field_list.size(); i++) {
auto data_type = output_field_list[i]->type();
if (data_type->id() == arrow::Type::DECIMAL) {
if (data_type->id() == arrow::Type::DECIMAL ||
data_type->id() == arrow::Type::TIMESTAMP) {
codes_ss << "builder_" << i << "_ = std::make_shared<"
<< GetTypeString(data_type, "Builder")
<< ">(arrow::" << GetArrowTypeDefString(data_type)
Expand Down
3 changes: 2 additions & 1 deletion native-sql-engine/cpp/src/precompile/unsafe_array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ namespace precompile {
PROCESS(arrow::Date32Type) \
PROCESS(arrow::Date64Type) \
PROCESS(arrow::StringType) \
PROCESS(arrow::Decimal128Type)
PROCESS(arrow::Decimal128Type) \
PROCESS(arrow::TimestampType)

arrow::Status MakeUnsafeArray(std::shared_ptr<arrow::DataType> type, int idx,
const std::shared_ptr<arrow::Array>& in,
Expand Down

0 comments on commit 343ea32

Please sign in to comment.