You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/01/13 17:25:21 UTC

[GitHub] [arrow] wjones127 edited a comment on pull request #12091: ARROW-14798: [C++][Python][R] Add container window to PrettyPrintOptions

wjones127 edited a comment on pull request #12091:
URL: https://github.com/apache/arrow/pull/12091#issuecomment-1012347118


   > So in the latest commits, you changed from `child_window` to `container_window` ? (and a ChunkedArray is considered 
   as a container?)
   
   Yeah a container right now is just a `ChunkedArray` and `ListArray`. Intended for any array-like type whose elements are also Arrays, where a `window` parameter becomes recursive. I found this does a better job of controlling the size of print output, while still allowing the user to view a meaningful number of primitive elements in the array.
   
   Default `window` is now 10 and `container_window` is 2, though in Python interface the ChunkedArray to string sets `window` to 5.
   
   > What's the exact consequence of that change on the repr in your example in the top post? (I am having a bit troubles wrapping my head around it .. ;))
   
   That output is up-to-date with the latest changes. The place where this change makes the most difference is if there are two-levels of container, such as a ChunkedArray of a ListArray. I would think about it in terms of the window at each level:
   
   ```
   window: 10, container_window: 2
   ChunkedArray<ListArray<StringArray>> (window 2)
     ListArray<StringArray> (window 2)
       StringArray (window 10)
   
   window: 2, child_window: 10
   ChunkedArray<ListArray<StringArray>> (window 2)
     ListArray<StringArray> (window 10)
       StringArray (window 10)
   ```
   


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