Skip to content

Commit cc9db8b

Browse files
assign empty array to data array if None
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent 0135d33 commit cc9db8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ class JsonQueue(ResultSetQueue):
5353

5454
def __init__(self, data_array):
5555
"""Initialize with JSON array data."""
56-
self.data_array = data_array
56+
self.data_array = data_array or []
5757
self.cur_row_index = 0
58-
self.num_rows = len(data_array) if data_array else 0
58+
self.num_rows = len(self.data_array)
5959

6060
def next_n_rows(self, num_rows):
6161
"""Get the next n rows from the data array."""

0 commit comments

Comments
 (0)