Use default cast for sliced list arrays if pyarrow >= 4
CONTRIBUTOR
I believe we don't use PyArrow >= 4.0.0 because of some segfault issues:
https://github.com/huggingface/datasets/blob/1206ffbcd42dda415f6bfb3d5040708f50413c93/setup.py#L78
Can you confirm @lhoestq ?
2021-06-14T10:59:24Z
https://github.com/huggingface/datasets/pull/2497#issuecomment-860594515
https://api.github.com/repos/huggingface/datasets/issues/2497
MDEyOklzc3VlQ29tbWVudDg2MDU5NDUxNQ==
https://api.github.com/repos/huggingface/datasets/issues/comments/860594515/reactions
2021-06-14T10:59:24Z
https://api.github.com/repos/huggingface/datasets/issues/comments/860594515
https://avatars.githubusercontent.com/u/33657802?v=4
https://api.github.com/users/SBrandeis/events{/privacy}
https://api.github.com/users/SBrandeis/followers
https://api.github.com/users/SBrandeis/following{/other_user}
https://api.github.com/users/SBrandeis/gists{/gist_id}
https://github.com/SBrandeis
SBrandeis
MDQ6VXNlcjMzNjU3ODAy
https://api.github.com/users/SBrandeis/orgs
https://api.github.com/users/SBrandeis/received_events
https://api.github.com/users/SBrandeis/repos
https://api.github.com/users/SBrandeis/starred{/owner}{/repo}
https://api.github.com/users/SBrandeis/subscriptions
User
https://api.github.com/users/SBrandeis
public
MEMBER
@SBrandeis pyarrow version 4.0.1 has fixed that issue: #2489 😉 
2021-06-14T11:01:02Z
https://github.com/huggingface/datasets/pull/2497#issuecomment-860595380
https://api.github.com/repos/huggingface/datasets/issues/2497
MDEyOklzc3VlQ29tbWVudDg2MDU5NTM4MA==
https://api.github.com/repos/huggingface/datasets/issues/comments/860595380/reactions
2021-06-14T11:02:19Z
https://api.github.com/repos/huggingface/datasets/issues/comments/860595380
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://github.com/albertvillanova
albertvillanova
MDQ6VXNlcjg1MTU0NjI=
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/received_events
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
User
https://api.github.com/users/albertvillanova
public
From pyarrow version 4, it is supported to cast sliced lists.

This PR uses default pyarrow cast in Datasets to cast sliced list arrays if pyarrow version is >= 4.

In relation with PR #2461 and #2490.

cc: @lhoestq, @abhi1thakur, @SBrandeis