Skip to content

Commit ce2e362

Browse files
committed
Added info comment
1 parent 1b879bf commit ce2e362

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

awswrangler/s3/_write_dataset.py

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ def _get_bucket_number(number_of_buckets: int, values: list[str | int | bool]) -
7070
def _get_value_hash(value: str | int | bool) -> int:
7171
if isinstance(value, (int, np.int_)):
7272
value = int(value)
73-
bigint_min, bigint_max = -(2 ** 63), 2 ** 63 - 1
74-
int_min, int_max = -(2 ** 31), 2 ** 31 - 1
73+
bigint_min, bigint_max = -(2**63), 2**63 - 1
74+
int_min, int_max = -(2**31), 2**31 - 1
7575
if not bigint_min <= value <= bigint_max:
7676
raise ValueError(f"{value} exceeds the range that Athena cannot handle as bigint.")
7777
if not int_min <= value <= int_max:
@@ -99,13 +99,13 @@ def _get_subgroup_prefix(keys: tuple[str, None], partition_cols: list[str], path
9999

100100

101101
def _delete_objects(
102-
keys: tuple[str, None],
103-
path_root: str,
104-
use_threads: bool | int,
105-
mode: str,
106-
partition_cols: list[str],
107-
boto3_session: boto3.Session | None = None,
108-
**func_kwargs: Any,
102+
keys: tuple[str, None],
103+
path_root: str,
104+
use_threads: bool | int,
105+
mode: str,
106+
partition_cols: list[str],
107+
boto3_session: boto3.Session | None = None,
108+
**func_kwargs: Any,
109109
) -> str:
110110
# Keys are either a primitive type or a tuple if partitioning by multiple cols
111111
keys = (keys,) if not isinstance(keys, tuple) else keys
@@ -122,17 +122,17 @@ def _delete_objects(
122122

123123
@engine.dispatch_on_engine
124124
def _to_partitions(
125-
df: pd.DataFrame,
126-
func: Callable[..., list[str]],
127-
concurrent_partitioning: bool,
128-
path_root: str,
129-
use_threads: bool | int,
130-
mode: str,
131-
partition_cols: list[str],
132-
bucketing_info: typing.BucketingInfoTuple | None,
133-
filename_prefix: str,
134-
boto3_session: boto3.Session | None,
135-
**func_kwargs: Any,
125+
df: pd.DataFrame,
126+
func: Callable[..., list[str]],
127+
concurrent_partitioning: bool,
128+
path_root: str,
129+
use_threads: bool | int,
130+
mode: str,
131+
partition_cols: list[str],
132+
bucketing_info: typing.BucketingInfoTuple | None,
133+
filename_prefix: str,
134+
boto3_session: boto3.Session | None,
135+
**func_kwargs: Any,
136136
) -> tuple[list[str], dict[str, list[str]]]:
137137
partitions_values: dict[str, list[str]] = {}
138138
proxy: _WriteProxy = _WriteProxy(use_threads=concurrent_partitioning)
@@ -189,15 +189,15 @@ def _to_partitions(
189189

190190
@engine.dispatch_on_engine
191191
def _to_buckets(
192-
df: pd.DataFrame,
193-
func: Callable[..., list[str]],
194-
path_root: str,
195-
bucketing_info: typing.BucketingInfoTuple,
196-
filename_prefix: str,
197-
boto3_session: boto3.Session | None,
198-
use_threads: bool | int,
199-
proxy: _WriteProxy | None = None,
200-
**func_kwargs: Any,
192+
df: pd.DataFrame,
193+
func: Callable[..., list[str]],
194+
path_root: str,
195+
bucketing_info: typing.BucketingInfoTuple,
196+
filename_prefix: str,
197+
boto3_session: boto3.Session | None,
198+
use_threads: bool | int,
199+
proxy: _WriteProxy | None = None,
200+
**func_kwargs: Any,
201201
) -> list[str]:
202202
_proxy: _WriteProxy = proxy if proxy else _WriteProxy(use_threads=False)
203203
s3_client = client(service_name="s3", session=boto3_session)
@@ -218,18 +218,18 @@ def _to_buckets(
218218

219219

220220
def _to_dataset(
221-
func: Callable[..., list[str]],
222-
concurrent_partitioning: bool,
223-
df: pd.DataFrame,
224-
path_root: str,
225-
filename_prefix: str | None,
226-
index: bool,
227-
use_threads: bool | int,
228-
mode: str,
229-
partition_cols: list[str] | None,
230-
bucketing_info: typing.BucketingInfoTuple | None,
231-
boto3_session: boto3.Session | None,
232-
**func_kwargs: Any,
221+
func: Callable[..., list[str]],
222+
concurrent_partitioning: bool,
223+
df: pd.DataFrame,
224+
path_root: str,
225+
filename_prefix: str | None,
226+
index: bool,
227+
use_threads: bool | int,
228+
mode: str,
229+
partition_cols: list[str] | None,
230+
bucketing_info: typing.BucketingInfoTuple | None,
231+
boto3_session: boto3.Session | None,
232+
**func_kwargs: Any,
233233
) -> tuple[list[str], dict[str, list[str]]]:
234234
path_root = path_root if path_root.endswith("/") else f"{path_root}/"
235235
# Evaluate mode

0 commit comments

Comments
 (0)