HyukjinKwon commented on code in PR #48466:
URL: https://github.com/apache/arrow/pull/48466#discussion_r2666822346


##########
python/pyarrow/src/arrow/python/arrow_to_pandas.cc:
##########
@@ -1548,6 +1547,19 @@ void ConvertDatesShift(const ChunkedArray& data, 
int64_t* out_values) {
   }
 }
 
+template <int64_t SHIFT>
+inline void ConvertDatetimeWithTruncation(const ChunkedArray& data, int64_t* 
out_values) {
+  for (int c = 0; c < data.num_chunks(); c++) {
+    const auto& arr = *data.chunk(c);
+    const int64_t* in_values = GetPrimitiveValues<int64_t>(arr);
+    for (int64_t i = 0; i < arr.length(); ++i) {
+      *out_values++ = arr.IsNull(i)
+                          ? kPandasTimestampNull
+                          : ((in_values[i] - in_values[i] % 
kMillisecondsInDay) * SHIFT);
+    }
+  }
+}

Review Comment:
   Yeah .. let me just keep it consistent for now



-- 
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]

Reply via email to