Skip to content

Commit 8457cb9

Browse files
committed
Black formatted
1 parent ef48d3e commit 8457cb9

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/databricks/sql/client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,9 @@ def fetchmany_arrow(self, size: int) -> "pyarrow.Table":
13351335
):
13361336
self._fill_results_buffer()
13371337
partial_results = self.results.next_n_rows(n_remaining_rows)
1338-
results = pyarrow.concat_tables([results, partial_results],promote_options="default")
1338+
results = pyarrow.concat_tables(
1339+
[results, partial_results], promote_options="default"
1340+
)
13391341
n_remaining_rows -= partial_results.num_rows
13401342
self._next_row_index += partial_results.num_rows
13411343

@@ -1391,7 +1393,9 @@ def fetchall_arrow(self) -> "pyarrow.Table":
13911393
while not self.has_been_closed_server_side and self.has_more_rows:
13921394
self._fill_results_buffer()
13931395
partial_results = self.results.remaining_rows()
1394-
results = pyarrow.concat_tables([results, partial_results],promote_options="default")
1396+
results = pyarrow.concat_tables(
1397+
[results, partial_results], promote_options="default"
1398+
)
13951399
self._next_row_index += partial_results.num_rows
13961400

13971401
return results

src/databricks/sql/utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,9 @@ def next_n_rows(self, num_rows: int) -> "pyarrow.Table":
265265
# Get remaining of num_rows or the rest of the current table, whichever is smaller
266266
length = min(num_rows, self.table.num_rows - self.table_row_index)
267267
table_slice = self.table.slice(self.table_row_index, length)
268-
results = pyarrow.concat_tables([results, table_slice],promote_options="default")
268+
results = pyarrow.concat_tables(
269+
[results, table_slice], promote_options="default"
270+
)
269271
self.table_row_index += table_slice.num_rows
270272

271273
# Replace current table with the next table if we are at the end of the current table
@@ -292,7 +294,9 @@ def remaining_rows(self) -> "pyarrow.Table":
292294
table_slice = self.table.slice(
293295
self.table_row_index, self.table.num_rows - self.table_row_index
294296
)
295-
results = pyarrow.concat_tables([results, table_slice],promote_options="default")
297+
results = pyarrow.concat_tables(
298+
[results, table_slice], promote_options="default"
299+
)
296300
self.table_row_index += table_slice.num_rows
297301
self.table = self._create_next_table()
298302
self.table_row_index = 0

0 commit comments

Comments
 (0)