Add `remove_columns` to `IterableDataset`
MEMBER
Thanks ! That looks all good :)

I don't think that batching would help. Indeed we're dealing with python iterators that yield elements one by one, so batched `map` needs to accumulate a batch, apply the function, and then yield examples from the batch.

Though once we have parallel processing in `map`, we can reconsider it

Also feel free to check the CI failure - apparently the import of `Union` is missing
2021-10-06T12:13:20Z
https://github.com/huggingface/datasets/pull/3030#issuecomment-936119282
https://api.github.com/repos/huggingface/datasets/issues/3030
IC_kwDODunzps43zAvy
https://api.github.com/repos/huggingface/datasets/issues/comments/936119282/reactions
2021-10-06T12:14:00Z
https://api.github.com/repos/huggingface/datasets/issues/comments/936119282
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
CONTRIBUTOR
Thanks for the review and explaining that! 
On top of what you said, I think `remove_columns` is very unlikely to be a bottleneck, so it doesn't matter anyways.
2021-10-06T15:47:41Z
https://github.com/huggingface/datasets/pull/3030#issuecomment-936538241
https://api.github.com/repos/huggingface/datasets/issues/3030
IC_kwDODunzps430nCB
https://api.github.com/repos/huggingface/datasets/issues/comments/936538241/reactions
2021-10-06T15:47:41Z
https://api.github.com/repos/huggingface/datasets/issues/comments/936538241
https://avatars.githubusercontent.com/u/31893406?v=4
https://api.github.com/users/changjonathanc/events{/privacy}
https://api.github.com/users/changjonathanc/followers
https://api.github.com/users/changjonathanc/following{/other_user}
https://api.github.com/users/changjonathanc/gists{/gist_id}
https://github.com/changjonathanc
changjonathanc
MDQ6VXNlcjMxODkzNDA2
https://api.github.com/users/changjonathanc/orgs
https://api.github.com/users/changjonathanc/received_events
https://api.github.com/users/changjonathanc/repos
https://api.github.com/users/changjonathanc/starred{/owner}{/repo}
https://api.github.com/users/changjonathanc/subscriptions
User
https://api.github.com/users/changjonathanc
public
CONTRIBUTOR
Thank you for reviewing! @mariosasko 

I wonder how the checking would work. Is there any checking present in `IterableDataset ` now? What if `.remove_columns()` is applied after some arbitrary `.map()`?
2021-10-07T13:31:14Z
https://github.com/huggingface/datasets/pull/3030#issuecomment-937795810
https://api.github.com/repos/huggingface/datasets/issues/3030
IC_kwDODunzps435aDi
https://api.github.com/repos/huggingface/datasets/issues/comments/937795810/reactions
2021-10-07T13:31:14Z
https://api.github.com/repos/huggingface/datasets/issues/comments/937795810
https://avatars.githubusercontent.com/u/31893406?v=4
https://api.github.com/users/changjonathanc/events{/privacy}
https://api.github.com/users/changjonathanc/followers
https://api.github.com/users/changjonathanc/following{/other_user}
https://api.github.com/users/changjonathanc/gists{/gist_id}
https://github.com/changjonathanc
changjonathanc
MDQ6VXNlcjMxODkzNDA2
https://api.github.com/users/changjonathanc/orgs
https://api.github.com/users/changjonathanc/received_events
https://api.github.com/users/changjonathanc/repos
https://api.github.com/users/changjonathanc/starred{/owner}{/repo}
https://api.github.com/users/changjonathanc/subscriptions
User
https://api.github.com/users/changjonathanc
public
MEMBER
> I wonder how the checking would work. Is there any checking present in IterableDataset now? What if .remove_columns() is applied after some arbitrary .map()?

That's the challenge here indeed ^^ In this case it's not trivial to know the names of the columns. Feel free to open an issue so we can discuss this
2021-10-08T15:33:15Z
https://github.com/huggingface/datasets/pull/3030#issuecomment-938735328
https://api.github.com/repos/huggingface/datasets/issues/3030
IC_kwDODunzps438_bg
https://api.github.com/repos/huggingface/datasets/issues/comments/938735328/reactions
2021-10-08T15:33:15Z
https://api.github.com/repos/huggingface/datasets/issues/comments/938735328
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
Fixes #2944

WIP
* Not tested yet.
* We might want to allow batched remove for efficiency.

@lhoestq Do you think it should have `batched=` and `batch_size=`?