Skip to content

Commit 79d58dd

Browse files
committed
renamed chunk_id to num_downloaded_chunks
Signed-off-by: Sai Shree Pradhan <saishree.pradhan@databricks.com>
1 parent 153d346 commit 79d58dd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/databricks/sql/result_set.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def __init__(
218218
:param is_direct_results: Whether there are more rows to fetch
219219
"""
220220
self.statement_type = execute_response.command_id.statement_type
221-
self.chunk_id = 0
221+
self.num_downloaded_chunks = 0
222222

223223
# Initialize ThriftResultSet-specific attributes
224224
self._use_cloud_fetch = use_cloud_fetch
@@ -241,10 +241,10 @@ def __init__(
241241
session_id_hex=session_id_hex,
242242
statement_id=execute_response.command_id.to_hex_guid(),
243243
statement_type=self.statement_type,
244-
chunk_id=self.chunk_id,
244+
chunk_id=self.num_downloaded_chunks,
245245
)
246246
if t_row_set and t_row_set.resultLinks:
247-
self.chunk_id = len(t_row_set.resultLinks)
247+
self.num_downloaded_chunks += len(t_row_set.resultLinks)
248248

249249
# Call parent constructor with common attributes
250250
super().__init__(
@@ -277,11 +277,11 @@ def _fill_results_buffer(self):
277277
arrow_schema_bytes=self._arrow_schema_bytes,
278278
description=self.description,
279279
use_cloud_fetch=self._use_cloud_fetch,
280-
chunk_id=self.chunk_id,
280+
chunk_id=self.num_downloaded_chunks,
281281
)
282282
self.results = results
283283
self.is_direct_results = is_direct_results
284-
self.chunk_id += result_links_count
284+
self.num_downloaded_chunks += result_links_count
285285

286286
def _convert_columnar_table(self, table):
287287
column_names = [c[0] for c in self.description]

0 commit comments

Comments
 (0)