Temporary dataset_path for remote fs URIs not built properly in arrow_dataset.py::load_from_disk
{'login': 'francisco-perez-sorrosal', 'id': 918006, 'node_id': 'MDQ6VXNlcjkxODAwNg==', 'avatar_url': 'https://avatars.githubusercontent.com/u/918006?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/francisco-perez-sorrosal', 'html_url': 'https://github.com/francisco-perez-sorrosal', 'followers_url': 'https://api.github.com/users/francisco-perez-sorrosal/followers', 'following_url': 'https://api.github.com/users/francisco-perez-sorrosal/following{/other_user}', 'gists_url': 'https://api.github.com/users/francisco-perez-sorrosal/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/francisco-perez-sorrosal/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/francisco-perez-sorrosal/subscriptions', 'organizations_url': 'https://api.github.com/users/francisco-perez-sorrosal/orgs', 'repos_url': 'https://api.github.com/users/francisco-perez-sorrosal/repos', 'events_url': 'https://api.github.com/users/francisco-perez-sorrosal/events{/privacy}', 'received_events_url': 'https://api.github.com/users/francisco-perez-sorrosal/received_events', 'type': 'User', 'site_admin': False}
[{'id': 1935892857, 'node_id': 'MDU6TGFiZWwxOTM1ODkyODU3', 'url': 'https://api.github.com/repos/huggingface/datasets/labels/bug', 'name': 'bug', 'color': 'd73a4a', 'default': True, 'description': "Something isn't working"}]
[]
Hi ! Good catch and thanks for opening a PR :)

I just responded in your PR
## Describe the bug
When trying to build a temporary dataset path from a remote URI in this block of code:

https://github.com/huggingface/datasets/blob/42f6b1d18a4a1b6009b6e62d115491be16dfca22/src/datasets/arrow_dataset.py#L1038-L1042

the result is not the expected when passing an absolute path in an URI like `hdfs:///absolute/path`.

## Steps to reproduce the bug
```python
dataset_path = "hdfs:///absolute/path"
src_dataset_path = extract_path_from_uri(dataset_path)
tmp_dir = get_temporary_cache_files_directory()
dataset_path = Path(tmp_dir, src_dataset_path)
print(dataset_path)
```

## Expected results
With the code above, we would expect a value in `dataset_path` similar to:
`/tmp/tmpnwxyvao5/absolute/path`

## Actual results
However, we get a `dataset_path` value like:
`/absolute/path`

This is because this line here: https://github.com/huggingface/datasets/blob/42f6b1d18a4a1b6009b6e62d115491be16dfca22/src/datasets/arrow_dataset.py#L1041
returns the last absolute path when two absolute paths (the one in `tmp_dir` and the one extracted from the URI in `src_dataset_path`) are passed as arguments.

## Environment info
- `datasets` version: 1.13.3
- Platform: Linux-3.10.0-1160.15.2.el7.x86_64-x86_64-with-glibc2.33
- Python version: 3.9.7
- PyArrow version: 5.0.0

{'url': 'https://api.github.com/repos/huggingface/datasets/issues/3295/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}