zhangstar333 commented on code in PR #59720:
URL: https://github.com/apache/doris/pull/59720#discussion_r2704627162
##########
be/src/vec/exec/format/parquet/parquet_column_convert.h:
##########
@@ -677,6 +677,31 @@ struct Int64ToTimestamp : public
PhysicalToLogicalConverter {
}
};
+struct Int64ToTimestampTz : public PhysicalToLogicalConverter {
+ Status physical_convert(ColumnPtr& src_physical_col, ColumnPtr&
src_logical_column) override {
+ ColumnPtr src_col = remove_nullable(src_physical_col);
+ MutableColumnPtr dst_col =
remove_nullable(src_logical_column)->assume_mutable();
+
+ size_t rows = src_col->size();
+ size_t start_idx = dst_col->size();
+ dst_col->resize(start_idx + rows);
+
+ const auto& src_data = assert_cast<const
ColumnInt64*>(src_col.get())->get_data();
+ auto& dest_data =
assert_cast<ColumnTimeStampTz*>(dst_col.get())->get_data();
+ static const cctz::time_zone utc = cctz::utc_time_zone();
+
+ for (int i = 0; i < rows; i++) {
+ int64_t x = src_data[i];
+ auto& num = dest_data[start_idx + i];
+ auto& value =
reinterpret_cast<DateV2Value<DateTimeV2ValueType>&>(num);
Review Comment:
binary_cast compile failed, here is rvalue&
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]