lidavidm commented on code in PR #418:
URL: https://github.com/apache/arrow-go/pull/418#discussion_r2162689805


##########
arrow/compute/utils.go:
##########
@@ -353,19 +354,45 @@ func commonTemporal(vals ...arrow.DataType) 
arrow.DataType {
                        }
                        zone = &ts.TimeZone
                        finestUnit = exec.Max(finestUnit, ts.Unit)
+               case arrow.TIME32, arrow.TIME64:
+                       ts := ty.(arrow.TemporalWithUnit)
+                       finestUnit = max(finestUnit, ts.TimeUnit())
+                       sawTime = true
+               case arrow.DURATION:
+                       ts := ty.(*arrow.DurationType)
+                       finestUnit = max(finestUnit, ts.Unit)
+                       sawDuration = true
                default:
                        return nil
                }
        }
 
-       switch {
-       case zone != nil:
-               // at least one timestamp seen
-               return &arrow.TimestampType{Unit: finestUnit, TimeZone: *zone}
-       case sawDate64:
-               return arrow.FixedWidthTypes.Date64
-       case sawDate32:
-               return arrow.FixedWidthTypes.Date32
+       sawTimestampOrDate := zone != nil || sawDate32 || sawDate64 || 
sawDuration

Review Comment:
   Ah, probably, though I guess it's small enough to not really warrant its own 
PR...



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