rok commented on code in PR #48626:
URL: https://github.com/apache/arrow/pull/48626#discussion_r2643710240


##########
python/pyarrow/src/arrow/python/inference.cc:
##########
@@ -309,6 +337,25 @@ class NumPyDtypeUnifier {
   int current_type_num() const { return current_type_num_; }
 
  private:
+  static const char* DatetimeUnitName(NPY_DATETIMEUNIT unit) {
+    switch (unit) {
+      case NPY_FR_s:
+        return "s";
+      case NPY_FR_ms:
+        return "ms";
+      case NPY_FR_us:
+        return "us";
+      case NPY_FR_ns:
+        return "ns";
+      case NPY_FR_D:
+        return "D";
+      case NPY_FR_GENERIC:
+        return "generic";
+      default:
+        return "unknown";

Review Comment:
   Numpy has other [time 
units](https://numpy.org/devdocs/reference/arrays.datetime.html#datetime-units).
 Could we perhaps print which was used in case this is hit instead of unknown? 
I don't know if this is practical, just asking.



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