emkornfield commented on a change in pull request #11359:
URL: https://github.com/apache/arrow/pull/11359#discussion_r741371830



##########
File path: go/arrow/array/interval.go
##########
@@ -279,6 +341,28 @@ func (a *DayTimeInterval) setData(data *Data) {
        }
 }
 
+func (a *DayTimeInterval) getOneForMarshal(i int) interface{} {
+       if a.IsValid(i) {
+               return a.values[i]
+       }
+       return nil
+}
+
+func (a *DayTimeInterval) MarshalJSON() ([]byte, error) {
+       if a.NullN() == 0 {
+               return json.Marshal(a.values)

Review comment:
       same comment, as months, consider making a formatted string that can be 
reparsed?  I guess whether we use a formatted string or the raw values comes 
down to who we expect to consume the JSON.  I think for machines the numbers 
might be more natural, but for human consumption formatted string makes it 
clearer what the types are.




-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to