Repository: modin-project/modin

Issue:
Capitalization of "S" in "S3://" results in inconsistent behaviors when reading from S3 path
<!--
General questions should be asked on the mailing list modin-dev@googlegroups.com.

Before submitting an issue, please fill out the following form.
-->

### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Linux
- **Modin installed from (source or binary)**: binary
- **Modin version**: 0.7.0
- **Python version**: 3.6.8
- **Exact command to reproduce**: 

<!--
You can obtain the Modin version with

python -c "import modin; print(modin.__version__)"
-->

### Describe the problem
<!-- Describe the problem clearly here. -->
Reading data from a S3 path, e.g. `read_csv`, `read_json`, behaves differently based on the capitalization of "S" in the path. See below code example.

### Source code / logs
<!-- Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem. -->
```
import pandas as pd
import ray
import modin.pandas as mpd

filepath = "s3://my-bucket/data/traffic.json"
filepath_2 = "s3://my-bucket/data/BikeSharingDaily.csv"
filepath_3 = "S3://my-bucket/data/BikeSharingDaily.csv"

# working
df_native = pd.read_json(filepath, lines=True)
df_native_2 = pd.read_csv(filepath_2)

# not working (FileNotFoundError: [Errno 2] No such file or directory: 's3://my-bucket/data/traffic.json')
df_modin = mpd.read_json(filepath, lines=True)

# working (but it prints, defaulting to pandas implementation)
df_modin_2 = mpd.read_csv(filepath_2)

# working (no additional print)
df_modin_3 = mpd.read_csv(filepath_3)
```


Discussion:
Hi @youngstone, thanks for the report!

This is a bit of a silly bug, and we weren't testing for `S3://`, only `s3://`, so the tests did not catch it.

The offending line is here: https://github.com/modin-project/modin/blob/6aac82bc06d8fd57d603d11ca62a966973839610/modin/engines/base/io/file_reader.py#L4

Thanks again for reporting!

Resolving patch:
diff --git a/modin/engines/base/io/file_reader.py b/modin/engines/base/io/file_reader.py
--- a/modin/engines/base/io/file_reader.py
+++ b/modin/engines/base/io/file_reader.py
@@ -1,7 +1,7 @@
 import os
 import re
 
-S3_ADDRESS_REGEX = re.compile("s3://(.*?)/(.*)")
+S3_ADDRESS_REGEX = re.compile("[sS]3://(.*?)/(.*)")
 NOT_IMPLEMENTED_MESSAGE = "Implement in children classes!"
 
 
@@ -21,7 +21,9 @@ def get_path(cls, file_path):
     def file_open(cls, file_path, mode="rb", compression="infer"):
         if isinstance(file_path, str):
             match = S3_ADDRESS_REGEX.search(file_path)
-            if match:
+            if match is not None:
+                if file_path[0] == "S":
+                    file_path = "{}{}".format("s", file_path[1:])
                 import s3fs as S3FS
                 from botocore.exceptions import NoCredentialsError
 
@@ -78,7 +80,9 @@ def file_size(cls, f):
     def file_exists(cls, file_path):
         if isinstance(file_path, str):
             match = S3_ADDRESS_REGEX.search(file_path)
-            if match:
+            if match is not None:
+                if file_path[0] == "S":
+                    file_path = "{}{}".format("s", file_path[1:])
                 import s3fs as S3FS
                 from botocore.exceptions import NoCredentialsError
 


Test patch: