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

[NSE-183] fix timestamp in native side #373

Merged
merged 1 commit into from
Jun 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,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