Skip to content

Commit

Permalink
Fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-rpanchapakesan committed Nov 20, 2023
1 parent 22f38d8 commit deb0dad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/snowflake/connector/cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,9 @@ def __del__(self) -> None: # pragma: no cover

@property
def description(self) -> list[ResultMetadata]:
if self._description is None:
return None

return [meta._to_result_metadata_v1() for meta in self._description]

@property
Expand Down Expand Up @@ -1152,6 +1155,8 @@ def describe(
kwargs["_describe_only"] = kwargs["_is_internal"] = True
self.execute(*args, **kwargs)

if self._description is None:
return None
return [meta._to_result_metadata_v1() for meta in self._description]

def _describe_internal(
Expand Down
4 changes: 3 additions & 1 deletion src/snowflake/connector/result_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ def __init__(
self._chunk_headers = chunk_headers
self._remote_chunk_info = remote_chunk_info
self._schema = schema
self.schema = [s._to_result_metadata_v1() for s in schema]
self.schema = (
[s._to_result_metadata_v1() for s in schema] if schema is not None else None
)
self._use_dict_result = use_dict_result
self._metrics: dict[str, int] = {}
self._data: str | list[tuple[Any, ...]] | None = None
Expand Down

0 comments on commit deb0dad

Please sign in to comment.