You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "hermanschaaf (via GitHub)" <gi...@apache.org> on 2023/03/30 08:16:01 UTC

[GitHub] [arrow] hermanschaaf opened a new issue, #34790: [Go] Support Array Diff

hermanschaaf opened a new issue, #34790:
URL: https://github.com/apache/arrow/issues/34790

   ### Describe the enhancement requested
   
   Similar to the CPP implementation of Array Diff (Python docs: https://arrow.apache.org/docs/python/generated/pyarrow.Array.html#pyarrow.Array.diff) it would be good to have the same in Go. As far as I can tell, there is an `array.Equal` in Go right now, but not `array.Diff`.
   
   Like its CPP counterpart, given two string arrays `["one", "two", "three"]` and `["two", None, "two-and-a-half", "three"]` it would output a string like this:
   
   ```
   @@ -0, +0 @@
   -"one"
   @@ -2, +1 @@
   +null
   +"two-and-a-half"
   ```
   
   ### Component(s)
   
   Go


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

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


[GitHub] [arrow] hermanschaaf commented on issue #34790: [Go] Support Array Diff

Posted by "hermanschaaf (via GitHub)" <gi...@apache.org>.
hermanschaaf commented on issue #34790:
URL: https://github.com/apache/arrow/issues/34790#issuecomment-1489889153

   I am happy to submit a PR for this. 
   
   Currently I', thinking it would go into a `diff.go` file inside `go/arrow/array`. The function signature would be `array.Diff(left, right arrow.Array) (string, error)`. An error would be returned if two arrays of different types are passed in, for example. (This is also not handled in the CPP version right now (see https://github.com/apache/arrow/blob/ddd0a337174e57cdc80b1ee30dc7e787acfc09f6/cpp/src/arrow/array/diff.cc#L113-L123)


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] zeroshade closed issue #34790: [Go] Support Array Diff

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade closed issue #34790: [Go] Support Array Diff
URL: https://github.com/apache/arrow/issues/34790


-- 
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: issues-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] hermanschaaf commented on issue #34790: [Go] Support Array Diff

Posted by "hermanschaaf (via GitHub)" <gi...@apache.org>.
hermanschaaf commented on issue #34790:
URL: https://github.com/apache/arrow/issues/34790#issuecomment-1491996502

   I have broken the implementation into two parts:
    - https://github.com/apache/arrow/pull/34806 for adding a `Diff` function that returns an edit script
    - https://github.com/apache/arrow/pull/34827 for adding a `DiffString` function that returns the edit script formatted using Unified Diff format (this is still in progress, opened in draft 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: github-unsubscribe@arrow.apache.org

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