imay commented on a change in pull request #1635: Enable parsing columns from
file path for Broker Load (#1582)
URL: https://github.com/apache/incubator-doris/pull/1635#discussion_r313686877
##########
File path: be/src/exec/parquet_reader.cpp
##########
@@ -396,6 +412,35 @@ Status ParquetReaderWrap::read(Tuple* tuple, const
std::vector<SlotDescriptor*>&
}
break;
}
+ case arrow::Type::type::DATE32: {
+ auto ts_array =
std::dynamic_pointer_cast<arrow::Date32Array>(_batch->column(column_index));
+ if (ts_array->IsNull(_current_line_of_group)) {
+ RETURN_IF_ERROR(set_field_null(tuple, slot_desc));
+ } else {
+ time_t timestamp =
(time_t)((int64_t)ts_array->Value(_current_line_of_group) * 24 * 60 * 60);
+ tm* local;
+ local = localtime(×tamp);
Review comment:
use localtime_r which is thread-safe
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]