Skip to content

Commit ccd5793

Browse files
nit: cleaner assignemnt of column
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent a7861e9 commit ccd5793

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,11 @@ def _normalise_arrow_metadata_cols(self, table: "pyarrow.Table") -> "pyarrow.Tab
356356
if self._column_index_mapping
357357
else None
358358
)
359-
360-
if old_idx is None:
361-
column = pyarrow.nulls(table.num_rows)
362-
else:
363-
column = table.column(old_idx)
359+
column = (
360+
pyarrow.nulls(table.num_rows)
361+
if old_idx is None
362+
else table.column(old_idx)
363+
)
364364

365365
# Apply transform if available
366366
if result_column.transform_value:
@@ -388,8 +388,8 @@ def _normalise_json_metadata_cols(self, rows: List[List[str]]) -> List[List[Any]
388388
if self._column_index_mapping
389389
else None
390390
)
391-
392391
value = None if old_idx is None else row[old_idx]
392+
393393
# Apply transform if available
394394
if result_column.transform_value:
395395
value = result_column.transform_value(value)

0 commit comments

Comments
 (0)