|
24 | 24 | from databricks.sql.exc import ProgrammingError
|
25 | 25 | from databricks.sql.thrift_api.TCLIService.ttypes import TSparkArrowResultLink
|
26 | 26 | 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 | +) |
28 | 33 |
|
29 | 34 | import logging
|
30 | 35 |
|
@@ -63,13 +68,15 @@ def build_queue(
|
63 | 68 | # INLINE disposition with JSON_ARRAY format
|
64 | 69 | return JsonQueue(result_data.data)
|
65 | 70 | elif manifest.format == ResultFormat.ARROW_STREAM.value:
|
66 |
| - if result_data.attachment is not None: |
| 71 | + if result_data.attachment is not None: |
67 | 72 | arrow_file = (
|
68 | 73 | lz4.frame.decompress(result_data.attachment)
|
69 | 74 | if lz4_compressed
|
70 | 75 | else result_data.attachment
|
71 | 76 | )
|
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 | + ) |
73 | 80 | return ArrowQueue(arrow_table, manifest.total_row_count)
|
74 | 81 |
|
75 | 82 | # EXTERNAL_LINKS disposition
|
@@ -207,7 +214,9 @@ def _progress_chunk_link(self):
|
207 | 214 | self._current_chunk_link = self._get_chunk_link(next_chunk_index)
|
208 | 215 | if not self._current_chunk_link:
|
209 | 216 | 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 | + ) |
211 | 220 | )
|
212 | 221 | return None
|
213 | 222 |
|
|
0 commit comments