Fix `add_column` on datasets with indices mapping
COLLABORATOR
Sure, let's include this in today's release.
2022-01-28T14:19:39Z
https://github.com/huggingface/datasets/pull/3647#issuecomment-1024268675
https://api.github.com/repos/huggingface/datasets/issues/3647
IC_kwDODunzps49DRmD
https://api.github.com/repos/huggingface/datasets/issues/comments/1024268675/reactions
2022-01-28T14:19:39Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1024268675
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
MEMBER
Cool ! The windows CI should be fixed on master now, feel free to merge :)
2022-01-28T14:41:34Z
https://github.com/huggingface/datasets/pull/3647#issuecomment-1024287360
https://api.github.com/repos/huggingface/datasets/issues/3647
IC_kwDODunzps49DWKA
https://api.github.com/repos/huggingface/datasets/issues/comments/1024287360/reactions
2022-01-28T14:41:34Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1024287360
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
My initial idea was to avoid the `flatten_indices` call and reorder a new column instead, but in the end I decided to follow `concatenate_datasets` and use `flatten_indices` to avoid padding when `dataset._indices.num_rows != dataset._data.num_rows`.

Fix #3599