Skip to content

fix: Ensure the converter runs to_snowflake on list items #2312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/snowflake/connector/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
import decimal
import json
import time
from datetime import date, datetime
from datetime import date, datetime, timedelta, timezone, tzinfo
from datetime import time as dt_t
from datetime import timedelta, timezone, tzinfo
from functools import partial
from logging import getLogger
from math import ceil
Expand Down Expand Up @@ -623,8 +622,8 @@ def _decimal_to_snowflake(self, value: decimal.Decimal) -> str | None:

def _list_to_snowflake(self, value: list) -> list:
return [
SnowflakeConverter.quote(v0)
for v0 in [SnowflakeConverter.escape(v) for v in value]
SnowflakeConverter.quote(SnowflakeConverter.escape(self.to_snowflake(v)))
for v in value
]

_tuple_to_snowflake = _list_to_snowflake
Expand Down