imay commented on a change in pull request #3069: Support 64 bit timestamp in 
from_unixtime
URL: https://github.com/apache/incubator-doris/pull/3069#discussion_r390703103
 
 

 ##########
 File path: be/src/exec/parquet_reader.cpp
 ##########
 @@ -188,30 +189,38 @@ Status ParquetReaderWrap::read_record_batch(const 
std::vector<SlotDescriptor*>&
 Status ParquetReaderWrap::handle_timestamp(const 
std::shared_ptr<arrow::TimestampArray>& ts_array, uint8_t *buf, int32_t 
*wbytes) {
     const auto type = 
std::dynamic_pointer_cast<arrow::TimestampType>(ts_array->type());
     // Doris only supports seconds
-    time_t timestamp = 0;
+    int64_t timestamp = 0;
     switch (type->unit()) {
         case arrow::TimeUnit::type::NANO: {// INT96
-            timestamp = 
(time_t)((int64_t)ts_array->Value(_current_line_of_batch) / 1000000000); // 
convert to Second
+            timestamp = ts_array->Value(_current_line_of_batch) / 1000000000; 
// convert to Second
 
 Review comment:
   ```suggestion
               timestamp = ts_array->Value(_current_line_of_batch) / 
1000000000L; // convert to Second
   ```

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to