Keep original features order
MEMBER
The arrow writer was supposing that the columns were always in the sorted order. I just pushed a fix to reorder the arrays accordingly to the schema. It was failing for many datasets like squad
2021-06-08T13:50:25Z
https://github.com/huggingface/datasets/pull/2453#issuecomment-856785850
https://api.github.com/repos/huggingface/datasets/issues/2453
MDEyOklzc3VlQ29tbWVudDg1Njc4NTg1MA==
https://api.github.com/repos/huggingface/datasets/issues/comments/856785850/reactions
2021-06-08T13:50:25Z
https://api.github.com/repos/huggingface/datasets/issues/comments/856785850
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
MEMBER
and obviously it broke everything
2021-06-08T14:03:28Z
https://github.com/huggingface/datasets/pull/2453#issuecomment-856797028
https://api.github.com/repos/huggingface/datasets/issues/2453
MDEyOklzc3VlQ29tbWVudDg1Njc5NzAyOA==
https://api.github.com/repos/huggingface/datasets/issues/comments/856797028/reactions
2021-06-08T14:03:28Z
https://api.github.com/repos/huggingface/datasets/issues/comments/856797028
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
MEMBER
Feel free to revert my commit. I can investigate this in the coming days
2021-06-08T14:04:52Z
https://github.com/huggingface/datasets/pull/2453#issuecomment-856798142
https://api.github.com/repos/huggingface/datasets/issues/2453
MDEyOklzc3VlQ29tbWVudDg1Njc5ODE0Mg==
https://api.github.com/repos/huggingface/datasets/issues/comments/856798142/reactions
2021-06-08T14:04:52Z
https://api.github.com/repos/huggingface/datasets/issues/comments/856798142
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
MEMBER
@lhoestq I do not understand when you say:
> It was failing for many datasets like squad

All the tests were green after my last commit.
2021-06-08T14:12:29Z
https://github.com/huggingface/datasets/pull/2453#issuecomment-856804313
https://api.github.com/repos/huggingface/datasets/issues/2453
MDEyOklzc3VlQ29tbWVudDg1NjgwNDMxMw==
https://api.github.com/repos/huggingface/datasets/issues/comments/856804313/reactions
2021-06-08T14:27:55Z
https://api.github.com/repos/huggingface/datasets/issues/comments/856804313
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
MEMBER
> All the tests were green after my last commit.

Yes but loading the actual squad dataset was failing :/

2021-06-08T15:03:22Z
https://github.com/huggingface/datasets/pull/2453#issuecomment-856847236
https://api.github.com/repos/huggingface/datasets/issues/2453
MDEyOklzc3VlQ29tbWVudDg1Njg0NzIzNg==
https://api.github.com/repos/huggingface/datasets/issues/comments/856847236/reactions
2021-06-08T15:03:22Z
https://api.github.com/repos/huggingface/datasets/issues/comments/856847236
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
When loading a Dataset from a JSON file whose column names are not sorted alphabetically, we should get the same column name order, whether we pass features (in the same order as in the file) or not.

I found this issue while working on #2366.