Skip to content

Commit 9cf6e02

Browse files
formatting (black)
Signed-off-by: varun-edachali-dbx <[email protected]>
1 parent 06a5d54 commit 9cf6e02

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

src/databricks/sql/backend/sea/backend.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,9 @@ def get_execution_result(
636636
arraysize=cursor.arraysize,
637637
)
638638

639-
def get_chunk_links(self, statement_id: str, chunk_index: int) -> List[ExternalLink]:
639+
def get_chunk_links(
640+
self, statement_id: str, chunk_index: int
641+
) -> List[ExternalLink]:
640642
"""
641643
Get links for chunks starting from the specified index.
642644
Args:

src/databricks/sql/backend/sea/queue.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@
2424
from databricks.sql.exc import ProgrammingError
2525
from databricks.sql.thrift_api.TCLIService.ttypes import TSparkArrowResultLink
2626
from databricks.sql.types import SSLOptions
27-
from databricks.sql.utils import ArrowQueue, CloudFetchQueue, ResultSetQueue, create_arrow_table_from_arrow_file
27+
from databricks.sql.utils import (
28+
ArrowQueue,
29+
CloudFetchQueue,
30+
ResultSetQueue,
31+
create_arrow_table_from_arrow_file,
32+
)
2833

2934
import logging
3035

@@ -63,13 +68,15 @@ def build_queue(
6368
# INLINE disposition with JSON_ARRAY format
6469
return JsonQueue(result_data.data)
6570
elif manifest.format == ResultFormat.ARROW_STREAM.value:
66-
if result_data.attachment is not None:
71+
if result_data.attachment is not None:
6772
arrow_file = (
6873
lz4.frame.decompress(result_data.attachment)
6974
if lz4_compressed
7075
else result_data.attachment
7176
)
72-
arrow_table = create_arrow_table_from_arrow_file(arrow_file, description)
77+
arrow_table = create_arrow_table_from_arrow_file(
78+
arrow_file, description
79+
)
7380
return ArrowQueue(arrow_table, manifest.total_row_count)
7481

7582
# EXTERNAL_LINKS disposition
@@ -207,7 +214,9 @@ def _progress_chunk_link(self):
207214
self._current_chunk_link = self._get_chunk_link(next_chunk_index)
208215
if not self._current_chunk_link:
209216
logger.error(
210-
"SeaCloudFetchQueue: unable to retrieve link for chunk {}".format(next_chunk_index)
217+
"SeaCloudFetchQueue: unable to retrieve link for chunk {}".format(
218+
next_chunk_index
219+
)
211220
)
212221
return None
213222

0 commit comments

Comments
 (0)