Skip to content
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

SNOW-1879403: In functions.replace, snowflake-snowpark-python v1.26.0 leads to AssertionError: Do not use lit(Column(...)), type hint does not allow this syntax. #2856

Open
ndevir opened this issue Jan 11, 2025 · 2 comments
Assignees
Labels
bug Something isn't working status-triage Issue is under initial triage

Comments

@ndevir
Copy link

ndevir commented Jan 11, 2025

Please answer these questions before submitting your issue. Thanks!

  1. What version of Python are you using?

    Python 3.11.4 (main, Feb 9 2024, 09:16:05) [GCC 9.4.0]

  2. What operating system and processor architecture are you using?

    Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35

  3. What are the component versions in the environment (pip freeze)?

asn1crypto==1.5.1
astroid==3.3.8
azure-core==1.32.0
azure-identity==1.19.0
azure-storage-blob==12.24.0
bcrypt==4.2.1
black==24.10.0
certifi==2024.12.14
cffi==1.17.1
cfgv==3.4.0
charset-normalizer==3.4.1
classify-imports==4.2.0
click==8.1.8
cloudpickle==2.2.1
coverage==7.6.10
cryptography==44.0.0
dataclasses-json==0.5.7
dill==0.3.9
distlib==0.3.9
filelock==3.16.1
identify==2.6.5
idna==3.10
intervaltree==3.1.0
isodate==0.7.2
isort==5.13.2
libcst==1.6.0
lxml==5.3.0
marshmallow==3.25.0
marshmallow-enum==1.5.1
mccabe==0.7.0
msal==1.31.1
msal-extensions==1.2.0
mypy-extensions==1.0.0
nodeenv==1.9.1
numpy==2.2.1
oauthlib==3.2.2
packaging==24.2
pandas==2.2.3
paramiko==3.5.0
pathspec==0.12.1
platformdirs==4.3.6
portalocker==2.10.1
pre_commit==4.0.1
pre_commit_hooks==5.0.0
protobuf==5.29.3
psutil==6.1.1
pyarrow==18.1.0
pycparser==2.22
pydocstyle==6.3.0
Pygments==2.19.1
PyJWT==2.10.1
pylint==3.3.3
PyNaCl==1.5.0
pyOpenSSL==24.3.0
pyre-check==0.9.23
pyre-extensions==0.0.32
python-dateutil==2.9.0.post0
pytz==2024.2
PyYAML==6.0.2
reorder_python_imports==3.14.0
requests==2.32.3
requests-oauthlib==2.0.0
ruamel.yaml==0.18.10
ruamel.yaml.clib==0.2.12
six==1.17.0
snowballstemmer==2.2.0
snowflake-connector-python==3.12.4
snowflake-snowpark-python==1.26.0
sortedcontainers==2.4.0
tabulate==0.9.0
TestSlide==2.7.1
tomlkit==0.13.2
typeguard==2.13.3
typing-inspect==0.9.0
typing_extensions==4.12.2
tzdata==2024.2
tzlocal==5.2
unittest-xml-reporting==3.2.0
urllib3==2.3.0
virtualenv==20.28.1
  1. What did you do?

import logging
import snowflake.snowpark.functions as spf
from utils.snowpark.snowpark_client import SnowparkClient

for logger_name in ('snowflake.snowpark', 'snowflake.connector'):
  logger = logging.getLogger(logger_name)
  logger.setLevel(logging.DEBUG)
  ch = logging.StreamHandler()
  ch.setLevel(logging.DEBUG)
  ch.setFormatter(logging.Formatter('%(asctime)s - %(threadName)s %(filename)s:%(lineno)d - %(funcName)s() - %(levelname)s - %(message)s'))
  logger.addHandler(ch)

with SnowparkClient("PUBLIC") as my_session:
  # create a new dataframe (my_session represents a correctly configured session)
  df = my_session.create_dataframe(
      data=[("this",)],
      schema=["A"]
  )

  # this operation succeeds
  df.with_column(
      "B",
      spf.replace(
          spf.col("A"),
          "this",
          "that"
      )
  )

  # this operation fails: AssertionError: Do not use lit(Column(...)), type hint does not allow this syntax.
  df.with_column(
      "B",
      spf.replace(
          spf.col("A"),
          spf.lit("this"),
          spf.lit("that")
      )
  )

  1. What did you expect to see?

I expected the above code to run without issues. So far (until snowflake-snowpark-python v1.25.0) it did work. Now (with snowflake-snowpark-python v1.26.0), lit (and other functions, e.g., iff) inside replace fails with the AssertionError that I commented into the code in section 4 (which can also be seen in the below logs).

I saw that as of snowflake-snowpark-python v1.26.0 lit (and several other functions in snowflake.snowpark.functions such as replace) has the @publicapi decorator which might be the cause for this problem.

  1. Can you set logging to DEBUG and collect the logs?
2025-01-11 07:48:22,881 - MainThread connection.py:414 - __init__() - INFO - Snowflake Connector for Python Version: 3.12.4, Python Version: 3.11.4, Platform: Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35
2025-01-11T06:48:22+0000 - 18665 - snowflake.connector.connection - INFO - Snowflake Connector for Python Version: 3.12.4, Python Version: 3.11.4, Platform: Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35
2025-01-11 07:48:22,881 - MainThread connection.py:731 - connect() - DEBUG - connect
2025-01-11T06:48:22+0000 - 18665 - snowflake.connector.connection - DEBUG - connect
2025-01-11 07:48:22,882 - MainThread connection.py:1115 - __config() - DEBUG - __config
2025-01-11T06:48:22+0000 - 18665 - snowflake.connector.connection - DEBUG - __config
2025-01-11 07:48:22,882 - MainThread connection.py:1197 - __config() - INFO - Connecting to GLOBAL Snowflake domain
2025-01-11T06:48:22+0000 - 18665 - snowflake.connector.connection - INFO - Connecting to GLOBAL Snowflake domain
2025-01-11 07:48:22,882 - MainThread connection.py:1278 - __config() - INFO - This connection is in OCSP Fail Open Mode. TLS Certificates would be checked for validity and revocation status. Any other Certificate Revocation related exceptions or OCSP Responder failures would be disregarded in favor of connectivity.
2025-01-11T06:48:22+0000 - 18665 - snowflake.connector.connection - INFO - This connection is in OCSP Fail Open Mode. TLS Certificates would be checked for validity and revocation status. Any other Certificate Revocation related exceptions or OCSP Responder failures would be disregarded in favor of connectivity.
2025-01-11 07:48:22,882 - MainThread converter.py:159 - __init__() - DEBUG - use_numpy: False
2025-01-11T06:48:22+0000 - 18665 - snowflake.connector.converter - DEBUG - use_numpy: False
2025-01-11 07:48:22,882 - MainThread connection.py:942 - __open_connection() - DEBUG - REST API object was created: account.snowflakecomputing.com:443
2025-01-11T06:48:22+0000 - 18665 - snowflake.connector.connection - DEBUG - REST API object was created: account.snowflakecomputing.com:443
2025-01-11 07:48:22,882 - MainThread _auth.py:186 - authenticate() - DEBUG - authenticate
2025-01-11T06:48:22+0000 - 18665 - snowflake.connector.auth._auth - DEBUG - authenticate
2025-01-11 07:48:22,883 - MainThread _auth.py:222 - authenticate() - DEBUG - account=account, user=USER, database=DB, schema=PUBLIC, warehouse=WH, role=ROLE, request_id=3965e5a1-275c-4868-91f3-3e7fa7459a3e
2025-01-11T06:48:22+0000 - 18665 - snowflake.connector.auth._auth - DEBUG - account=account, user=USER, database=DB, schema=PUBLIC, warehouse=WH, role=ROLE, request_id=3965e5a1-275c-4868-91f3-3e7fa7459a3e
2025-01-11 07:48:22,883 - MainThread _auth.py:255 - authenticate() - DEBUG - body['data']: {'CLIENT_APP_ID': 'PythonSnowpark', 'CLIENT_APP_VERSION': '1.26.0', 'SVN_REVISION': None, 'ACCOUNT_NAME': 'account', 'LOGIN_NAME': 'USER', 'CLIENT_ENVIRONMENT': {'APPLICATION': 'PythonSnowpark', 'OS': 'Linux', 'OS_VERSION': 'Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35', 'PYTHON_VERSION': '3.11.4', 'PYTHON_RUNTIME': 'CPython', 'PYTHON_COMPILER': 'GCC 9.4.0', 'OCSP_MODE': 'FAIL_OPEN', 'TRACING': 10, 'LOGIN_TIMEOUT': None, 'NETWORK_TIMEOUT': None, 'SOCKET_TIMEOUT': None}, 'PASSWORD': '******', 'SESSION_PARAMETERS': {'TIMEZONE': 'Europe/Zurich', 'CLIENT_PREFETCH_THREADS': 4}}
2025-01-11T06:48:22+0000 - 18665 - snowflake.connector.auth._auth - DEBUG - body['data']: {'CLIENT_APP_ID': 'PythonSnowpark', 'CLIENT_APP_VERSION': '1.26.0', 'SVN_REVISION': None, 'ACCOUNT_NAME': 'account', 'LOGIN_NAME': 'USER', 'CLIENT_ENVIRONMENT': {'APPLICATION': 'PythonSnowpark', 'OS': 'Linux', 'OS_VERSION': 'Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35', 'PYTHON_VERSION': '3.11.4', 'PYTHON_RUNTIME': 'CPython', 'PYTHON_COMPILER': 'GCC 9.4.0', 'OCSP_MODE': 'FAIL_OPEN', 'TRACING': 10, 'LOGIN_TIMEOUT': None, 'NETWORK_TIMEOUT': None, 'SOCKET_TIMEOUT': None}, 'PASSWORD': '******', 'SESSION_PARAMETERS': {'TIMEZONE': 'Europe/Zurich', 'CLIENT_PREFETCH_THREADS': 4}}
2025-01-11 07:48:22,883 - MainThread retry.py:351 - from_int() - DEBUG - Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
2025-01-11T06:48:22+0000 - 18665 - snowflake.connector.vendored.urllib3.util.retry - DEBUG - Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
2025-01-11 07:48:22,883 - MainThread retry.py:351 - from_int() - DEBUG - Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
2025-01-11T06:48:22+0000 - 18665 - snowflake.connector.vendored.urllib3.util.retry - DEBUG - Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
2025-01-11 07:48:22,883 - MainThread network.py:1221 - _use_requests_session() - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 1/1 active sessions
2025-01-11T06:48:22+0000 - 18665 - snowflake.connector.network - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 1/1 active sessions
2025-01-11 07:48:22,883 - MainThread network.py:895 - _request_exec_wrapper() - DEBUG - remaining request timeout: N/A ms, retry cnt: 1
2025-01-11T06:48:22+0000 - 18665 - snowflake.connector.network - DEBUG - remaining request timeout: N/A ms, retry cnt: 1
2025-01-11 07:48:22,884 - MainThread network.py:877 - add_request_guid() - DEBUG - Request guid: 7c9147e0-491b-4da1-a853-2d668ab6f1fe
2025-01-11T06:48:22+0000 - 18665 - snowflake.connector.network - DEBUG - Request guid: 7c9147e0-491b-4da1-a853-2d668ab6f1fe
2025-01-11 07:48:22,884 - MainThread network.py:1067 - _request_exec() - DEBUG - socket timeout: 60
2025-01-11T06:48:22+0000 - 18665 - snowflake.connector.network - DEBUG - socket timeout: 60
2025-01-11 07:48:22,886 - MainThread connectionpool.py:1019 - _new_conn() - DEBUG - Starting new HTTPS connection (1): account.snowflakecomputing.com:443
2025-01-11T06:48:22+0000 - 18665 - snowflake.connector.vendored.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): account.snowflakecomputing.com:443
2025-01-11 07:48:23,135 - MainThread ssl_wrap_socket.py:79 - ssl_wrap_socket_with_ocsp() - DEBUG - OCSP Mode: FAIL_OPEN, OCSP response cache file name: None
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.ssl_wrap_socket - DEBUG - OCSP Mode: FAIL_OPEN, OCSP response cache file name: None
2025-01-11 07:48:23,184 - MainThread ocsp_snowflake.py:491 - reset_cache_dir() - DEBUG - cache directory: /home/.cache/snowflake
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.ocsp_snowflake - DEBUG - cache directory: /home/.cache/snowflake
2025-01-11 07:48:23,189 - MainThread ocsp_snowflake.py:529 - reset_ocsp_response_cache_uri() - DEBUG - ocsp_response_cache_uri: file:///home/.cache/snowflake/ocsp_response_cache.json
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.ocsp_snowflake - DEBUG - ocsp_response_cache_uri: file:///home/.cache/snowflake/ocsp_response_cache.json
2025-01-11 07:48:23,190 - MainThread ocsp_snowflake.py:532 - reset_ocsp_response_cache_uri() - DEBUG - OCSP_VALIDATION_CACHE size: 291
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.ocsp_snowflake - DEBUG - OCSP_VALIDATION_CACHE size: 291
2025-01-11 07:48:23,190 - MainThread ocsp_snowflake.py:328 - reset_ocsp_dynamic_cache_server_url() - DEBUG - OCSP response cache server is enabled: http://ocsp.snowflakecomputing.com/ocsp_response_cache.json
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.ocsp_snowflake - DEBUG - OCSP response cache server is enabled: http://ocsp.snowflakecomputing.com/ocsp_response_cache.json
2025-01-11 07:48:23,191 - MainThread ocsp_snowflake.py:341 - reset_ocsp_dynamic_cache_server_url() - DEBUG - OCSP dynamic cache server RETRY URL: None
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.ocsp_snowflake - DEBUG - OCSP dynamic cache server RETRY URL: None
2025-01-11 07:48:23,192 - MainThread ocsp_snowflake.py:970 - validate() - DEBUG - validating certificate: account.snowflakecomputing.com
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.ocsp_snowflake - DEBUG - validating certificate: account.snowflakecomputing.com
2025-01-11 07:48:23,193 - MainThread ocsp_asn1crypto.py:401 - extract_certificate_chain() - DEBUG - # of certificates: 3
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.ocsp_asn1crypto - DEBUG - # of certificates: 3
2025-01-11 07:48:23,198 - MainThread ocsp_asn1crypto.py:406 - extract_certificate_chain() - DEBUG - subject: OrderedDict([('country_name', 'US'), ('state_or_province_name', 'Montana'), ('locality_name', 'Bozeman'), ('organization_name', 'Snowflake Inc.'), ('common_name', '*.west-europe.azure.snowflakecomputing.com')]), issuer: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('common_name', 'DigiCert Global G2 TLS RSA SHA256 2020 CA1')])
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.ocsp_asn1crypto - DEBUG - subject: OrderedDict([('country_name', 'US'), ('state_or_province_name', 'Montana'), ('locality_name', 'Bozeman'), ('organization_name', 'Snowflake Inc.'), ('common_name', '*.west-europe.azure.snowflakecomputing.com')]), issuer: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('common_name', 'DigiCert Global G2 TLS RSA SHA256 2020 CA1')])
2025-01-11 07:48:23,202 - MainThread ocsp_asn1crypto.py:406 - extract_certificate_chain() - DEBUG - subject: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('common_name', 'DigiCert Global G2 TLS RSA SHA256 2020 CA1')]), issuer: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('organizational_unit_name', 'www.digicert.com'), ('common_name', 'DigiCert Global Root G2')])
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.ocsp_asn1crypto - DEBUG - subject: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('common_name', 'DigiCert Global G2 TLS RSA SHA256 2020 CA1')]), issuer: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('organizational_unit_name', 'www.digicert.com'), ('common_name', 'DigiCert Global Root G2')])
2025-01-11 07:48:23,206 - MainThread ocsp_asn1crypto.py:406 - extract_certificate_chain() - DEBUG - subject: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('organizational_unit_name', 'www.digicert.com'), ('common_name', 'DigiCert Global Root G2')]), issuer: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('organizational_unit_name', 'www.digicert.com'), ('common_name', 'DigiCert Global Root G2')])
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.ocsp_asn1crypto - DEBUG - subject: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('organizational_unit_name', 'www.digicert.com'), ('common_name', 'DigiCert Global Root G2')]), issuer: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('organizational_unit_name', 'www.digicert.com'), ('common_name', 'DigiCert Global Root G2')])
2025-01-11 07:48:23,225 - MainThread ocsp_snowflake.py:729 - find_cache() - DEBUG - hit cache for subject: OrderedDict([('country_name', 'US'), ('state_or_province_name', 'Montana'), ('locality_name', 'Bozeman'), ('organization_name', 'Snowflake Inc.'), ('common_name', '*.west-europe.azure.snowflakecomputing.com')])
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.ocsp_snowflake - DEBUG - hit cache for subject: OrderedDict([('country_name', 'US'), ('state_or_province_name', 'Montana'), ('locality_name', 'Bozeman'), ('organization_name', 'Snowflake Inc.'), ('common_name', '*.west-europe.azure.snowflakecomputing.com')])
2025-01-11 07:48:23,230 - MainThread ocsp_snowflake.py:729 - find_cache() - DEBUG - hit cache for subject: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('common_name', 'DigiCert Global G2 TLS RSA SHA256 2020 CA1')])
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.ocsp_snowflake - DEBUG - hit cache for subject: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('common_name', 'DigiCert Global G2 TLS RSA SHA256 2020 CA1')])
2025-01-11 07:48:23,242 - MainThread ocsp_snowflake.py:1027 - _validate() - DEBUG - ok
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.ocsp_snowflake - DEBUG - ok
2025-01-11 07:48:23,722 - MainThread connectionpool.py:474 - _make_request() - DEBUG - https://account.snowflakecomputing.com:443 "POST /session/v1/login-request?request_id=3965e5a1-275c-4868-91f3-3e7fa7459a3e&databaseName=DB&schemaName=PUBLIC&warehouse=WH&roleName=ROLE&request_guid=7c9147e0-491b-4da1-a853-2d668ab6f1fe HTTP/1.1" 200 5726
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.vendored.urllib3.connectionpool - DEBUG - https://account.snowflakecomputing.com:443 "POST /session/v1/login-request?request_id=3965e5a1-275c-4868-91f3-3e7fa7459a3e&databaseName=DB&schemaName=PUBLIC&warehouse=WH&roleName=ROLE&request_guid=7c9147e0-491b-4da1-a853-2d668ab6f1fe HTTP/1.1" 200 5726
2025-01-11 07:48:23,724 - MainThread network.py:1094 - _request_exec() - DEBUG - SUCCESS
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.network - DEBUG - SUCCESS
2025-01-11 07:48:23,725 - MainThread network.py:1226 - _use_requests_session() - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 0/1 active sessions
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.network - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 0/1 active sessions
2025-01-11 07:48:23,726 - MainThread network.py:759 - _post_request() - DEBUG - ret[code] = None, after post request
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.network - DEBUG - ret[code] = None, after post request
2025-01-11 07:48:23,726 - MainThread _auth.py:385 - authenticate() - DEBUG - completed authentication
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.auth._auth - DEBUG - completed authentication
2025-01-11 07:48:23,727 - MainThread _auth.py:432 - authenticate() - DEBUG - token = ******
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.auth._auth - DEBUG - token = ******
2025-01-11 07:48:23,728 - MainThread _auth.py:440 - authenticate() - DEBUG - master_token = ******
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.auth._auth - DEBUG - master_token = ******
2025-01-11 07:48:23,728 - MainThread _auth.py:448 - authenticate() - DEBUG - id_token = NULL
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.auth._auth - DEBUG - id_token = NULL
2025-01-11 07:48:23,729 - MainThread _auth.py:456 - authenticate() - DEBUG - mfa_token = NULL
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.auth._auth - DEBUG - mfa_token = NULL
2025-01-11 07:48:23,736 - MainThread connection.py:861 - cursor() - DEBUG - cursor
2025-01-11T06:48:23+0000 - 18665 - snowflake.connector.connection - DEBUG - cursor
2025-01-11 07:48:23,741 - MainThread session.py:664 - __init__() - INFO - Snowpark Session information: 
"version" : 1.26.0,
"python.version" : 3.11.4,
"python.connector.version" : 3.12.4,
"python.connector.session.id" : 46985435354473899,
"os.name" : Linux

2025-01-11T06:48:23+0000 - 18665 - snowflake.snowpark.session - INFO - Snowpark Session information: 
"version" : 1.26.0,
"python.version" : 3.11.4,
"python.connector.version" : 3.12.4,
"python.connector.session.id" : 46985435354473899,
"os.name" : Linux

2025-01-11 07:48:24,060 - MainThread cursor.py:921 - execute() - DEBUG - executing SQL/command
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - executing SQL/command
2025-01-11 07:48:24,061 - MainThread cursor.py:936 - execute() - DEBUG - query: [SELECT $1 AS "A" FROM  VALUES ('a' :: STRING)]
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - query: [SELECT $1 AS "A" FROM  VALUES ('a' :: STRING)]
2025-01-11 07:48:24,061 - MainThread connection.py:1654 - _next_sequence_counter() - DEBUG - sequence counter: 1
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.connection - DEBUG - sequence counter: 1
2025-01-11 07:48:24,062 - MainThread cursor.py:644 - _execute_helper() - DEBUG - Request id: ab565444-6e13-4fc5-8553-34bec5950c2d
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - Request id: ab565444-6e13-4fc5-8553-34bec5950c2d
2025-01-11 07:48:24,062 - MainThread cursor.py:646 - _execute_helper() - DEBUG - running query [SELECT $1 AS "A" FROM  VALUES ('a' :: STRING)]
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - running query [SELECT $1 AS "A" FROM  VALUES ('a' :: STRING)]
2025-01-11 07:48:24,063 - MainThread cursor.py:653 - _execute_helper() - DEBUG - is_file_transfer: True
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - is_file_transfer: True
2025-01-11 07:48:24,063 - MainThread connection.py:1313 - cmd_query() - DEBUG - _cmd_query
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.connection - DEBUG - _cmd_query
2025-01-11 07:48:24,064 - MainThread _query_context_cache.py:155 - serialize_to_dict() - DEBUG - serialize_to_dict() called
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - serialize_to_dict() called
2025-01-11 07:48:24,064 - MainThread connection.py:1342 - cmd_query() - DEBUG - sql=[SELECT $1 AS "A" FROM  VALUES ('a' :: STRING)], sequence_id=[1], is_file_transfer=[False]
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.connection - DEBUG - sql=[SELECT $1 AS "A" FROM  VALUES ('a' :: STRING)], sequence_id=[1], is_file_transfer=[False]
2025-01-11 07:48:24,065 - MainThread network.py:493 - request() - DEBUG - Opentelemtry otel injection failed
Traceback (most recent call last):
  File "/home/.venv/lib/python3.11/site-packages/snowflake/connector/network.py", line 487, in request
    from opentelemetry.trace.propagation.tracecontext import (
ModuleNotFoundError: No module named 'opentelemetry'
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - Opentelemtry otel injection failed
Traceback (most recent call last):
  File "/home/.venv/lib/python3.11/site-packages/snowflake/connector/network.py", line 487, in request
    from opentelemetry.trace.propagation.tracecontext import (
ModuleNotFoundError: No module named 'opentelemetry'
2025-01-11 07:48:24,067 - MainThread network.py:1221 - _use_requests_session() - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 1/1 active sessions
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 1/1 active sessions
2025-01-11 07:48:24,068 - MainThread network.py:895 - _request_exec_wrapper() - DEBUG - remaining request timeout: N/A ms, retry cnt: 1
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - remaining request timeout: N/A ms, retry cnt: 1
2025-01-11 07:48:24,068 - MainThread network.py:877 - add_request_guid() - DEBUG - Request guid: 947da394-69c7-4559-a995-c72aaf58aac0
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - Request guid: 947da394-69c7-4559-a995-c72aaf58aac0
2025-01-11 07:48:24,069 - MainThread network.py:1067 - _request_exec() - DEBUG - socket timeout: 60
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - socket timeout: 60
2025-01-11 07:48:24,199 - MainThread connectionpool.py:474 - _make_request() - DEBUG - https://account.snowflakecomputing.com:443 "POST /queries/v1/query-request?requestId=ab565444-6e13-4fc5-8553-34bec5950c2d&request_guid=947da394-69c7-4559-a995-c72aaf58aac0 HTTP/1.1" 200 None
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.vendored.urllib3.connectionpool - DEBUG - https://account.snowflakecomputing.com:443 "POST /queries/v1/query-request?requestId=ab565444-6e13-4fc5-8553-34bec5950c2d&request_guid=947da394-69c7-4559-a995-c72aaf58aac0 HTTP/1.1" 200 None
2025-01-11 07:48:24,204 - MainThread network.py:1094 - _request_exec() - DEBUG - SUCCESS
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - SUCCESS
2025-01-11 07:48:24,204 - MainThread network.py:1226 - _use_requests_session() - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 0/1 active sessions
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 0/1 active sessions
2025-01-11 07:48:24,204 - MainThread network.py:759 - _post_request() - DEBUG - ret[code] = None, after post request
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - ret[code] = None, after post request
2025-01-11 07:48:24,205 - MainThread network.py:785 - _post_request() - DEBUG - Query id: 01b9a278-0105-4fc4-00a6-ed030b8b7bfb
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - Query id: 01b9a278-0105-4fc4-00a6-ed030b8b7bfb
2025-01-11 07:48:24,205 - MainThread _query_context_cache.py:191 - deserialize_json_dict() - DEBUG - deserialize_json_dict() called: data from server: {'entries': [{'id': 0, 'timestamp': 1736578104246758, 'priority': 0, 'context': 'CJL+VA=='}]}
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - deserialize_json_dict() called: data from server: {'entries': [{'id': 0, 'timestamp': 1736578104246758, 'priority': 0, 'context': 'CJL+VA=='}]}
2025-01-11 07:48:24,205 - MainThread _query_context_cache.py:232 - deserialize_json_dict() - DEBUG - deserialize {'id': 0, 'timestamp': 1736578104246758, 'priority': 0, 'context': 'CJL+VA=='}
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - deserialize {'id': 0, 'timestamp': 1736578104246758, 'priority': 0, 'context': 'CJL+VA=='}
2025-01-11 07:48:24,205 - MainThread _query_context_cache.py:101 - _sync_priority_map() - DEBUG - sync_priority_map called priority_map size = 0, new_priority_map size = 1
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - sync_priority_map called priority_map size = 0, new_priority_map size = 1
2025-01-11 07:48:24,206 - MainThread _query_context_cache.py:127 - trim_cache() - DEBUG - trim_cache() called. treeSet size is 1 and cache capacity is 5
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - trim_cache() called. treeSet size is 1 and cache capacity is 5
2025-01-11 07:48:24,206 - MainThread _query_context_cache.py:136 - trim_cache() - DEBUG - trim_cache() returns. treeSet size is 1 and cache capacity is 5
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - trim_cache() returns. treeSet size is 1 and cache capacity is 5
2025-01-11 07:48:24,206 - MainThread _query_context_cache.py:271 - deserialize_json_dict() - DEBUG - deserialize_json_dict() returns
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - deserialize_json_dict() returns
2025-01-11 07:48:24,206 - MainThread _query_context_cache.py:276 - log_cache_entries() - DEBUG - Cache Entry: (0, 1736578104246758, 0)
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - Cache Entry: (0, 1736578104246758, 0)
2025-01-11 07:48:24,207 - MainThread cursor.py:995 - execute() - DEBUG - sfqid: 01b9a278-0105-4fc4-00a6-ed030b8b7bfb
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - sfqid: 01b9a278-0105-4fc4-00a6-ed030b8b7bfb
2025-01-11 07:48:24,207 - MainThread cursor.py:1001 - execute() - DEBUG - query execution done
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - query execution done
2025-01-11 07:48:24,207 - MainThread cursor.py:1015 - execute() - DEBUG - SUCCESS
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - SUCCESS
2025-01-11 07:48:24,207 - MainThread cursor.py:1034 - execute() - DEBUG - PUT OR GET: False
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - PUT OR GET: False
2025-01-11 07:48:24,207 - MainThread cursor.py:1152 - _init_result_and_meta() - DEBUG - Query result format: arrow
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - Query result format: arrow
2025-01-11 07:48:24,208 - MainThread cursor.py:1166 - _init_result_and_meta() - INFO - Number of results in first chunk: 0
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - INFO - Number of results in first chunk: 0
2025-01-11 07:48:24,212 - MainThread session.py:752 - close() - INFO - Closing session: 46985435354473899
2025-01-11T06:48:24+0000 - 18665 - snowflake.snowpark.session - INFO - Closing session: 46985435354473899
2025-01-11 07:48:24,212 - MainThread session.py:1033 - cancel_all() - INFO - Canceling all running queries
2025-01-11T06:48:24+0000 - 18665 - snowflake.snowpark.session - INFO - Canceling all running queries
2025-01-11 07:48:24,212 - MainThread cursor.py:921 - execute() - DEBUG - executing SQL/command
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - executing SQL/command
2025-01-11 07:48:24,212 - MainThread cursor.py:936 - execute() - DEBUG - query: [select system$cancel_all_queries(46985435354473899)]
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - query: [select system$cancel_all_queries(46985435354473899)]
2025-01-11 07:48:24,212 - MainThread connection.py:1654 - _next_sequence_counter() - DEBUG - sequence counter: 2
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.connection - DEBUG - sequence counter: 2
2025-01-11 07:48:24,213 - MainThread cursor.py:644 - _execute_helper() - DEBUG - Request id: 16e4d902-4334-4acc-97cb-8401e5b3b8ed
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - Request id: 16e4d902-4334-4acc-97cb-8401e5b3b8ed
2025-01-11 07:48:24,213 - MainThread cursor.py:646 - _execute_helper() - DEBUG - running query [select system$cancel_all_queries(46985435354473899)]
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - running query [select system$cancel_all_queries(46985435354473899)]
2025-01-11 07:48:24,213 - MainThread cursor.py:653 - _execute_helper() - DEBUG - is_file_transfer: True
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - is_file_transfer: True
2025-01-11 07:48:24,213 - MainThread connection.py:1313 - cmd_query() - DEBUG - _cmd_query
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.connection - DEBUG - _cmd_query
2025-01-11 07:48:24,213 - MainThread _query_context_cache.py:155 - serialize_to_dict() - DEBUG - serialize_to_dict() called
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - serialize_to_dict() called
2025-01-11 07:48:24,214 - MainThread _query_context_cache.py:276 - log_cache_entries() - DEBUG - Cache Entry: (0, 1736578104246758, 0)
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - Cache Entry: (0, 1736578104246758, 0)
2025-01-11 07:48:24,214 - MainThread _query_context_cache.py:180 - serialize_to_dict() - DEBUG - serialize_to_dict(): data to send to server {'entries': [{'id': 0, 'timestamp': 1736578104246758, 'priority': 0, 'context': {'base64Data': 'CJL+VA=='}}]}
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - serialize_to_dict(): data to send to server {'entries': [{'id': 0, 'timestamp': 1736578104246758, 'priority': 0, 'context': {'base64Data': 'CJL+VA=='}}]}
2025-01-11 07:48:24,214 - MainThread connection.py:1342 - cmd_query() - DEBUG - sql=[select system$cancel_all_queries(46985435354473899)], sequence_id=[2], is_file_transfer=[False]
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.connection - DEBUG - sql=[select system$cancel_all_queries(46985435354473899)], sequence_id=[2], is_file_transfer=[False]
2025-01-11 07:48:24,215 - MainThread network.py:493 - request() - DEBUG - Opentelemtry otel injection failed
Traceback (most recent call last):
  File "/home/src/feed.py", line 132, in <module>
    spf.replace(
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/utils.py", line 960, in func_call_wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/functions.py", line 3268, in replace
    pat = lit(pattern, _emit_ast=_emit_ast)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/utils.py", line 960, in func_call_wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/functions.py", line 367, in lit
    assert not isinstance(
AssertionError: Do not use lit(Column(...)), type hint does not allow this syntax.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/.venv/lib/python3.11/site-packages/snowflake/connector/network.py", line 487, in request
    from opentelemetry.trace.propagation.tracecontext import (
ModuleNotFoundError: No module named 'opentelemetry'
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - Opentelemtry otel injection failed
Traceback (most recent call last):
  File "/home/src/feed.py", line 132, in <module>
    spf.replace(
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/utils.py", line 960, in func_call_wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/functions.py", line 3268, in replace
    pat = lit(pattern, _emit_ast=_emit_ast)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/utils.py", line 960, in func_call_wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/functions.py", line 367, in lit
    assert not isinstance(
AssertionError: Do not use lit(Column(...)), type hint does not allow this syntax.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/.venv/lib/python3.11/site-packages/snowflake/connector/network.py", line 487, in request
    from opentelemetry.trace.propagation.tracecontext import (
ModuleNotFoundError: No module named 'opentelemetry'
2025-01-11 07:48:24,219 - MainThread network.py:1221 - _use_requests_session() - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 1/1 active sessions
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 1/1 active sessions
2025-01-11 07:48:24,219 - MainThread network.py:895 - _request_exec_wrapper() - DEBUG - remaining request timeout: N/A ms, retry cnt: 1
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - remaining request timeout: N/A ms, retry cnt: 1
2025-01-11 07:48:24,219 - MainThread network.py:877 - add_request_guid() - DEBUG - Request guid: 81aa8dea-0792-4eeb-b59d-993efdff1535
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - Request guid: 81aa8dea-0792-4eeb-b59d-993efdff1535
2025-01-11 07:48:24,220 - MainThread network.py:1067 - _request_exec() - DEBUG - socket timeout: 60
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - socket timeout: 60
2025-01-11 07:48:24,360 - MainThread connectionpool.py:474 - _make_request() - DEBUG - https://account.snowflakecomputing.com:443 "POST /queries/v1/query-request?requestId=16e4d902-4334-4acc-97cb-8401e5b3b8ed&request_guid=81aa8dea-0792-4eeb-b59d-993efdff1535 HTTP/1.1" 200 None
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.vendored.urllib3.connectionpool - DEBUG - https://account.snowflakecomputing.com:443 "POST /queries/v1/query-request?requestId=16e4d902-4334-4acc-97cb-8401e5b3b8ed&request_guid=81aa8dea-0792-4eeb-b59d-993efdff1535 HTTP/1.1" 200 None
2025-01-11 07:48:24,361 - MainThread network.py:1094 - _request_exec() - DEBUG - SUCCESS
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - SUCCESS
2025-01-11 07:48:24,361 - MainThread network.py:1226 - _use_requests_session() - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 0/1 active sessions
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 0/1 active sessions
2025-01-11 07:48:24,362 - MainThread network.py:759 - _post_request() - DEBUG - ret[code] = None, after post request
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - ret[code] = None, after post request
2025-01-11 07:48:24,362 - MainThread network.py:785 - _post_request() - DEBUG - Query id: 01b9a278-0105-4f93-00a6-ed030b8c1227
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - Query id: 01b9a278-0105-4f93-00a6-ed030b8c1227
2025-01-11 07:48:24,362 - MainThread _query_context_cache.py:191 - deserialize_json_dict() - DEBUG - deserialize_json_dict() called: data from server: {'entries': [{'id': 0, 'timestamp': 1736578104396127, 'priority': 0, 'context': 'CM78VA=='}]}
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - deserialize_json_dict() called: data from server: {'entries': [{'id': 0, 'timestamp': 1736578104396127, 'priority': 0, 'context': 'CM78VA=='}]}
2025-01-11 07:48:24,362 - MainThread _query_context_cache.py:276 - log_cache_entries() - DEBUG - Cache Entry: (0, 1736578104246758, 0)
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - Cache Entry: (0, 1736578104246758, 0)
2025-01-11 07:48:24,362 - MainThread _query_context_cache.py:232 - deserialize_json_dict() - DEBUG - deserialize {'id': 0, 'timestamp': 1736578104396127, 'priority': 0, 'context': 'CM78VA=='}
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - deserialize {'id': 0, 'timestamp': 1736578104396127, 'priority': 0, 'context': 'CM78VA=='}
2025-01-11 07:48:24,363 - MainThread _query_context_cache.py:101 - _sync_priority_map() - DEBUG - sync_priority_map called priority_map size = 0, new_priority_map size = 1
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - sync_priority_map called priority_map size = 0, new_priority_map size = 1
2025-01-11 07:48:24,363 - MainThread _query_context_cache.py:127 - trim_cache() - DEBUG - trim_cache() called. treeSet size is 1 and cache capacity is 5
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - trim_cache() called. treeSet size is 1 and cache capacity is 5
2025-01-11 07:48:24,363 - MainThread _query_context_cache.py:136 - trim_cache() - DEBUG - trim_cache() returns. treeSet size is 1 and cache capacity is 5
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - trim_cache() returns. treeSet size is 1 and cache capacity is 5
2025-01-11 07:48:24,363 - MainThread _query_context_cache.py:271 - deserialize_json_dict() - DEBUG - deserialize_json_dict() returns
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - deserialize_json_dict() returns
2025-01-11 07:48:24,363 - MainThread _query_context_cache.py:276 - log_cache_entries() - DEBUG - Cache Entry: (0, 1736578104396127, 0)
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - Cache Entry: (0, 1736578104396127, 0)
2025-01-11 07:48:24,363 - MainThread cursor.py:995 - execute() - DEBUG - sfqid: 01b9a278-0105-4f93-00a6-ed030b8c1227
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - sfqid: 01b9a278-0105-4f93-00a6-ed030b8c1227
2025-01-11 07:48:24,363 - MainThread cursor.py:1001 - execute() - DEBUG - query execution done
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - query execution done
2025-01-11 07:48:24,363 - MainThread cursor.py:1015 - execute() - DEBUG - SUCCESS
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - SUCCESS
2025-01-11 07:48:24,363 - MainThread cursor.py:1034 - execute() - DEBUG - PUT OR GET: False
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - PUT OR GET: False
2025-01-11 07:48:24,363 - MainThread cursor.py:1152 - _init_result_and_meta() - DEBUG - Query result format: arrow
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - DEBUG - Query result format: arrow
2025-01-11 07:48:24,364 - MainThread cursor.py:1166 - _init_result_and_meta() - INFO - Number of results in first chunk: 1
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.cursor - INFO - Number of results in first chunk: 1
2025-01-11 07:48:24,364 - MainThread server_connection.py:504 - run_query() - DEBUG - Execute query [queryID: 01b9a278-0105-4f93-00a6-ed030b8c1227] select system$cancel_all_queries(46985435354473899)
2025-01-11T06:48:24+0000 - 18665 - snowflake.snowpark._internal.server_connection - DEBUG - Execute query [queryID: 01b9a278-0105-4f93-00a6-ed030b8c1227] select system$cancel_all_queries(46985435354473899)
2025-01-11 07:48:24,364 - MainThread result_batch.py:68 - _create_nanoarrow_iterator() - DEBUG - Using nanoarrow as the arrow data converter
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.result_batch - DEBUG - Using nanoarrow as the arrow data converter
2025-01-11 07:48:24,364 - MainThread CArrowIterator.cpp:120 - CArrowIterator() - DEBUG - Arrow BatchSize: 1
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.CArrowIterator - DEBUG - Arrow BatchSize: 1
2025-01-11 07:48:24,364 - MainThread CArrowChunkIterator.cpp:46 - CArrowChunkIterator() - DEBUG - Arrow chunk info: batchCount 1, columnCount 1, use_numpy: 0
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.CArrowIterator - DEBUG - Arrow chunk info: batchCount 1, columnCount 1, use_numpy: 0
2025-01-11 07:48:24,364 - MainThread nanoarrow_arrow_iterator.cpython-311-x86_64-linux-gnu.so:0 - __cinit__() - DEBUG - Batches read: 0
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.nanoarrow_arrow_iterator - DEBUG - Batches read: 0
2025-01-11 07:48:24,364 - MainThread result_set.py:87 - result_set_iterator() - DEBUG - beginning to schedule result batch downloads
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.result_set - DEBUG - beginning to schedule result batch downloads
2025-01-11 07:48:24,365 - MainThread CArrowChunkIterator.cpp:70 - next() - DEBUG - Current batch index: 0, rows in current batch: 1
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.CArrowIterator - DEBUG - Current batch index: 0, rows in current batch: 1
2025-01-11 07:48:24,365 - MainThread connection.py:789 - close() - INFO - closed
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.connection - INFO - closed
2025-01-11 07:48:24,365 - MainThread telemetry.py:211 - close() - DEBUG - Closing telemetry client.
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.telemetry - DEBUG - Closing telemetry client.
2025-01-11 07:48:24,367 - MainThread telemetry.py:176 - send_batch() - DEBUG - Sending 1 logs to telemetry. Data is {'logs': [{'message': {'driver_type': 'PythonConnector', 'driver_version': '3.12.4', 'source': 'PythonSnowpark', 'type': 'client_imported_packages', 'value': "{'queue', 'linecache', 'numpy', 'signal', 'copy', 're', 'platformdirs', 'posixpath', 'enum', 'gc', 'tarfile', 'packaging', 'unicodedata', 'site', 'pyarrow', 'keyword', 'quopri', 'abc', 'pyexpat', 'bisect', 'OpenSSL', 'jaraco', 'fcntl', 'numbers', 'pandas', 'pprint', 'sortedcontainers', 'typing_extensions', 'opcode', 'concurrent', 'struct', 'stat', 'shlex', 'pwd'**** 'charset_normalizer', 'grp', 'copyreg', 'contextvars', 'binascii', 'decimal', 'sysconfig', 'cmath', 'stringprep', 'io', 'math', 'bz2', 'token', 'errno', 'json', 'weakref', 'csv', 'uuid', 'html', 'random', 'select', 'tempfile', 'sys', 'codecs', 'hmac', 'tokenize', 'socket', 'traceback', 'pytz', 'importlib', 'http', 'configparser', 'gettext', 'google', 'secrets', 'idna', 'ssl', 'fnmatch', 'pkgutil', 'click', 'jwt', 'tzlocal', 'subprocess', 'urllib3', 'builtins', 'base64', 'lzma', 'cython_runtime', 'gzip', 'ipaddress', 'dis', 'plistlib', 'textwrap', 'zlib', 'six', 'webbrowser', 'fractions', 'dateutil', 'zoneinfo', 'snowflake', 'datetime', 'mimetypes', 'operator', 'locale', 'asn1crypto', 'ast', 'heapq', 'xml', 'urllib', 'cryptography', 'glob', 'pathlib', 'genericpath', 'zipfile', 'socketserver', 'ntpath', 'contextlib', 'calendar', 'tomlkit', 'dataclasses', 'pickle', 'asyncio', 'atexit', 'more_itertools', 'string', 'requests', 'bcrypt', 'array', 'typing', 'collections', 'email', 'encodings', 'functools', 'hashlib', 'reprlib', 'yaml', 'inspect', 'types', 'marshal', 'os', 'time', 'cloudpickle', 'mmap', 'zipimport', 'itertools', 'ctypes', 'difflib', 'filelock', 'shutil', 'statistics', 'threading', 'pydoc', 'backports', 'platform', 'logging', 'unittest', 'warnings', 'argparse', 'posix', 'pkg_resources', 'selectors', 'certifi'}"}, 'timestamp': '1736578103735'}, {'message': {'source': 'PythonSnowpark', 'version': '1.26.0', 'python_version': '3.11.4', 'operating_system': 'Linux', 'type': 'snowpark_session_created', 'data': {'start_time': 1736578103736, 'created_by_snowpark': 1}}, 'timestamp': '1736578103736'}, {'message': {'source': 'PythonSnowpark', 'version': '1.26.0', 'python_version': '3.11.4', 'operating_system': 'Linux', 'type': 'snowpark_cursor_created', 'data': {'session_id': 46985435354473899, 'thread_ident': 140161167624000}}, 'timestamp': '1736578103737'}, {'message': {'driver_type': 'PythonConnector', 'driver_version': '3.12.4', 'source': 'PythonSnowpark', 'type': 'client_time_consume_first_result', 'query_id': '01b9a278-0105-4fc4-00a6-ed030b8b7bfb', 'value': -41}, 'timestamp': '1736578104207'}, {'message': {'source': 'PythonSnowpark', 'version': '1.26.0', 'python_version': '3.11.4', 'operating_system': 'Linux', 'type': 'snowpark_describe_query_details', 'data': {'session_id': 46985435354473899, 'sql_text': ' SELECT $1 AS "A" FROM  VALUES (\'a\' :: STRING)', 'e2e_time': 0.14790987968444824, 'stack_trace': [').select(project_columns, _emit_ast=False)', 'r = func(*args, **kwargs)', 'return func(*args, **kwargs)', 'return self._with_plan(self._select_statement.select(names), _ast_stmt=stmt)', 'new_column_states = derive_column_states_from_subquery(cols, self)', 'from_c_state = from_.column_states.get(quoted_c_name)', 'self.column_states = self.from_.column_states', 'column_attrs = self.snowflake_plan.attributes', 'attributes = analyze_attributes(self.schema_query, self.session)']}}, 'timestamp': '1736578104208'}, {'message': {'driver_type': 'PythonConnector', 'driver_version': '3.12.4', 'source': 'PythonSnowpark', 'type': 'client_time_consume_first_result', 'query_id': '01b9a278-0105-4f93-00a6-ed030b8c1227', 'value': -36}, 'timestamp': '1736578104363'}, {'message': {'driver_type': 'PythonConnector', 'driver_version': '3.12.4', 'source': 'PythonSnowpark', 'type': 'client_time_consume_last_result', 'query_id': '01b9a278-0105-4f93-00a6-ed030b8c1227', 'value': 2}, 'timestamp': '1736578104365'}, {'message': {'source': 'PythonSnowpark', 'version': '1.26.0', 'python_version': '3.11.4', 'operating_system': 'Linux', 'type': 'snowpark_temp_table_cleanup', 'data': {'session_id': 46985435354473899, 'temp_table_cleaner_enabled': False, 'num_temp_tables_cleaned': 0, 'num_temp_tables_created': 0}}, 'timestamp': '1736578104365'}]}.
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.telemetry - DEBUG - Sending 1 logs to telemetry. Data is {'logs': [{'message': {'driver_type': 'PythonConnector', 'driver_version': '3.12.4', 'source': 'PythonSnowpark', 'type': 'client_imported_packages', 'value': "{'queue', 'linecache', 'numpy', 'signal', 'copy', 're', 'platformdirs', 'posixpath', 'enum', 'gc', 'tarfile', 'packaging', 'unicodedata', 'site', 'pyarrow', 'keyword', 'quopri', 'abc', 'pyexpat', 'bisect', 'OpenSSL', 'jaraco', 'fcntl', 'numbers', 'pandas', 'pprint', 'sortedcontainers', 'typing_extensions', 'opcode', 'concurrent', 'struct', 'stat', 'shlex', 'pwd'**** 'charset_normalizer', 'grp', 'copyreg', 'contextvars', 'binascii', 'decimal', 'sysconfig', 'cmath', 'stringprep', 'io', 'math', 'bz2', 'token', 'errno', 'json', 'weakref', 'csv', 'uuid', 'html', 'random', 'select', 'tempfile', 'sys', 'codecs', 'hmac', 'tokenize', 'socket', 'traceback', 'pytz', 'importlib', 'http', 'configparser', 'gettext', 'google', 'secrets', 'idna', 'ssl', 'fnmatch', 'pkgutil', 'click', 'jwt', 'tzlocal', 'subprocess', 'urllib3', 'builtins', 'base64', 'lzma', 'cython_runtime', 'gzip', 'ipaddress', 'dis', 'plistlib', 'textwrap', 'zlib', 'six', 'webbrowser', 'fractions', 'dateutil', 'zoneinfo', 'snowflake', 'datetime', 'mimetypes', 'operator', 'locale', 'asn1crypto', 'ast', 'heapq', 'xml', 'urllib', 'cryptography', 'glob', 'pathlib', 'genericpath', 'zipfile', 'socketserver', 'ntpath', 'contextlib', 'calendar', 'tomlkit', 'dataclasses', 'pickle', 'asyncio', 'atexit', 'more_itertools', 'string', 'requests', 'bcrypt', 'array', 'typing', 'collections', 'email', 'encodings', 'functools', 'hashlib', 'reprlib', 'yaml', 'inspect', 'types', 'marshal', 'os', 'time', 'cloudpickle', 'mmap', 'zipimport', 'itertools', 'ctypes', 'difflib', 'filelock', 'shutil', 'statistics', 'threading', 'pydoc', 'backports', 'platform', 'logging', 'unittest', 'warnings', 'argparse', 'posix', 'pkg_resources', 'selectors', 'certifi'}"}, 'timestamp': '1736578103735'}, {'message': {'source': 'PythonSnowpark', 'version': '1.26.0', 'python_version': '3.11.4', 'operating_system': 'Linux', 'type': 'snowpark_session_created', 'data': {'start_time': 1736578103736, 'created_by_snowpark': 1}}, 'timestamp': '1736578103736'}, {'message': {'source': 'PythonSnowpark', 'version': '1.26.0', 'python_version': '3.11.4', 'operating_system': 'Linux', 'type': 'snowpark_cursor_created', 'data': {'session_id': 46985435354473899, 'thread_ident': 140161167624000}}, 'timestamp': '1736578103737'}, {'message': {'driver_type': 'PythonConnector', 'driver_version': '3.12.4', 'source': 'PythonSnowpark', 'type': 'client_time_consume_first_result', 'query_id': '01b9a278-0105-4fc4-00a6-ed030b8b7bfb', 'value': -41}, 'timestamp': '1736578104207'}, {'message': {'source': 'PythonSnowpark', 'version': '1.26.0', 'python_version': '3.11.4', 'operating_system': 'Linux', 'type': 'snowpark_describe_query_details', 'data': {'session_id': 46985435354473899, 'sql_text': ' SELECT $1 AS "A" FROM  VALUES (\'a\' :: STRING)', 'e2e_time': 0.14790987968444824, 'stack_trace': [').select(project_columns, _emit_ast=False)', 'r = func(*args, **kwargs)', 'return func(*args, **kwargs)', 'return self._with_plan(self._select_statement.select(names), _ast_stmt=stmt)', 'new_column_states = derive_column_states_from_subquery(cols, self)', 'from_c_state = from_.column_states.get(quoted_c_name)', 'self.column_states = self.from_.column_states', 'column_attrs = self.snowflake_plan.attributes', 'attributes = analyze_attributes(self.schema_query, self.session)']}}, 'timestamp': '1736578104208'}, {'message': {'driver_type': 'PythonConnector', 'driver_version': '3.12.4', 'source': 'PythonSnowpark', 'type': 'client_time_consume_first_result', 'query_id': '01b9a278-0105-4f93-00a6-ed030b8c1227', 'value': -36}, 'timestamp': '1736578104363'}, {'message': {'driver_type': 'PythonConnector', 'driver_version': '3.12.4', 'source': 'PythonSnowpark', 'type': 'client_time_consume_last_result', 'query_id': '01b9a278-0105-4f93-00a6-ed030b8c1227', 'value': 2}, 'timestamp': '1736578104365'}, {'message': {'source': 'PythonSnowpark', 'version': '1.26.0', 'python_version': '3.11.4', 'operating_system': 'Linux', 'type': 'snowpark_temp_table_cleanup', 'data': {'session_id': 46985435354473899, 'temp_table_cleaner_enabled': False, 'num_temp_tables_cleaned': 0, 'num_temp_tables_created': 0}}, 'timestamp': '1736578104365'}]}.
2025-01-11 07:48:24,368 - MainThread network.py:493 - request() - DEBUG - Opentelemtry otel injection failed
Traceback (most recent call last):
  File "/home/src/feed.py", line 132, in <module>
    spf.replace(
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/utils.py", line 960, in func_call_wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/functions.py", line 3268, in replace
    pat = lit(pattern, _emit_ast=_emit_ast)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/utils.py", line 960, in func_call_wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/functions.py", line 367, in lit
    assert not isinstance(
AssertionError: Do not use lit(Column(...)), type hint does not allow this syntax.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/.venv/lib/python3.11/site-packages/snowflake/connector/network.py", line 487, in request
    from opentelemetry.trace.propagation.tracecontext import (
ModuleNotFoundError: No module named 'opentelemetry'
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - Opentelemtry otel injection failed
Traceback (most recent call last):
  File "/home/src/feed.py", line 132, in <module>
    spf.replace(
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/utils.py", line 960, in func_call_wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/functions.py", line 3268, in replace
    pat = lit(pattern, _emit_ast=_emit_ast)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/utils.py", line 960, in func_call_wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/functions.py", line 367, in lit
    assert not isinstance(
AssertionError: Do not use lit(Column(...)), type hint does not allow this syntax.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/.venv/lib/python3.11/site-packages/snowflake/connector/network.py", line 487, in request
    from opentelemetry.trace.propagation.tracecontext import (
ModuleNotFoundError: No module named 'opentelemetry'
2025-01-11 07:48:24,370 - MainThread network.py:1221 - _use_requests_session() - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 1/1 active sessions
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 1/1 active sessions
2025-01-11 07:48:24,370 - MainThread network.py:895 - _request_exec_wrapper() - DEBUG - remaining request timeout: 5000 ms, retry cnt: 1
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - remaining request timeout: 5000 ms, retry cnt: 1
2025-01-11 07:48:24,370 - MainThread network.py:877 - add_request_guid() - DEBUG - Request guid: 4060a406-e3ba-4d6a-8b43-58112f7e27d4
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - Request guid: 4060a406-e3ba-4d6a-8b43-58112f7e27d4
2025-01-11 07:48:24,371 - MainThread network.py:1067 - _request_exec() - DEBUG - socket timeout: 60
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - socket timeout: 60
2025-01-11 07:48:24,460 - MainThread connectionpool.py:474 - _make_request() - DEBUG - https://account.snowflakecomputing.com:443 "POST /telemetry/send?request_guid=4060a406-e3ba-4d6a-8b43-58112f7e27d4 HTTP/1.1" 200 None
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.vendored.urllib3.connectionpool - DEBUG - https://account.snowflakecomputing.com:443 "POST /telemetry/send?request_guid=4060a406-e3ba-4d6a-8b43-58112f7e27d4 HTTP/1.1" 200 None
2025-01-11 07:48:24,461 - MainThread network.py:1094 - _request_exec() - DEBUG - SUCCESS
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - SUCCESS
2025-01-11 07:48:24,461 - MainThread network.py:1226 - _use_requests_session() - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 0/1 active sessions
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 0/1 active sessions
2025-01-11 07:48:24,461 - MainThread network.py:759 - _post_request() - DEBUG - ret[code] = None, after post request
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - ret[code] = None, after post request
2025-01-11 07:48:24,461 - MainThread telemetry.py:200 - send_batch() - DEBUG - Successfully uploading metrics to telemetry.
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.telemetry - DEBUG - Successfully uploading metrics to telemetry.
2025-01-11 07:48:24,461 - MainThread connection.py:795 - close() - INFO - No async queries seem to be running, deleting session
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.connection - INFO - No async queries seem to be running, deleting session
2025-01-11 07:48:24,462 - MainThread network.py:1221 - _use_requests_session() - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 1/1 active sessions
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 1/1 active sessions
2025-01-11 07:48:24,462 - MainThread network.py:895 - _request_exec_wrapper() - DEBUG - remaining request timeout: 5000 ms, retry cnt: 1
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - remaining request timeout: 5000 ms, retry cnt: 1
2025-01-11 07:48:24,462 - MainThread network.py:877 - add_request_guid() - DEBUG - Request guid: 60bf274d-7df8-493d-b87f-5dc24f5e504a
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - Request guid: 60bf274d-7df8-493d-b87f-5dc24f5e504a
2025-01-11 07:48:24,462 - MainThread network.py:1067 - _request_exec() - DEBUG - socket timeout: 60
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - socket timeout: 60
2025-01-11 07:48:24,599 - MainThread connectionpool.py:474 - _make_request() - DEBUG - https://account.snowflakecomputing.com:443 "POST /session?delete=true&request_guid=60bf274d-7df8-493d-b87f-5dc24f5e504a HTTP/1.1" 200 None
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.vendored.urllib3.connectionpool - DEBUG - https://account.snowflakecomputing.com:443 "POST /session?delete=true&request_guid=60bf274d-7df8-493d-b87f-5dc24f5e504a HTTP/1.1" 200 None
2025-01-11 07:48:24,601 - MainThread network.py:1094 - _request_exec() - DEBUG - SUCCESS
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - SUCCESS
2025-01-11 07:48:24,602 - MainThread network.py:1226 - _use_requests_session() - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 0/1 active sessions
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - Session status for SessionPool 'account.snowflakecomputing.com', SessionPool 0/1 active sessions
2025-01-11 07:48:24,603 - MainThread network.py:759 - _post_request() - DEBUG - ret[code] = None, after post request
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.network - DEBUG - ret[code] = None, after post request
2025-01-11 07:48:24,607 - MainThread _query_context_cache.py:141 - clear_cache() - DEBUG - clear_cache() called
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector._query_context_cache - DEBUG - clear_cache() called
2025-01-11 07:48:24,608 - MainThread connection.py:808 - close() - DEBUG - Session is closed
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.connection - DEBUG - Session is closed
2025-01-11 07:48:24,609 - MainThread session.py:760 - close() - INFO - Closed session: 46985435354473899
2025-01-11T06:48:24+0000 - 18665 - snowflake.snowpark.session - INFO - Closed session: 46985435354473899
Traceback (most recent call last):
  File "/home/src/feed.py", line 132, in <module>
    spf.replace(
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/utils.py", line 960, in func_call_wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/functions.py", line 3268, in replace
    pat = lit(pattern, _emit_ast=_emit_ast)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/utils.py", line 960, in func_call_wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/.venv/lib/python3.11/site-packages/snowflake/snowpark/functions.py", line 367, in lit
    assert not isinstance(
AssertionError: Do not use lit(Column(...)), type hint does not allow this syntax.
2025-01-11 07:48:24,621 - MainThread session.py:747 - close() - DEBUG - No-op because session 46985435354473899 had been previously closed.
2025-01-11T06:48:24+0000 - 18665 - snowflake.snowpark.session - DEBUG - No-op because session 46985435354473899 had been previously closed.
2025-01-11 07:48:24,621 - MainThread connection.py:780 - close() - DEBUG - Rest object has been destroyed, cannot close session
2025-01-11T06:48:24+0000 - 18665 - snowflake.connector.connection - DEBUG - Rest object has been destroyed, cannot close session
2025-01-11 07:48:24,622 - MainThread session.py:760 - close() - INFO - Closed session: 46985435354473899
2025-01-11T06:48:24+0000 - 18665 - snowflake.snowpark.session - INFO - Closed session: 46985435354473899
@ndevir ndevir added bug Something isn't working needs triage Initial RCA is required labels Jan 11, 2025
@github-actions github-actions bot changed the title In functions.lit, snowflake-snowpark-python v1.26.0 leads to AssertionError: Do not use lit(Column(...)), type hint does not allow this syntax. SNOW-1879403: In functions.lit, snowflake-snowpark-python v1.26.0 leads to AssertionError: Do not use lit(Column(...)), type hint does not allow this syntax. Jan 11, 2025
@ndevir ndevir changed the title SNOW-1879403: In functions.lit, snowflake-snowpark-python v1.26.0 leads to AssertionError: Do not use lit(Column(...)), type hint does not allow this syntax. SNOW-1879403: In functions.replace, snowflake-snowpark-python v1.26.0 leads to AssertionError: Do not use lit(Column(...)), type hint does not allow this syntax. Jan 11, 2025
@sfc-gh-sghosh sfc-gh-sghosh self-assigned this Jan 13, 2025
@sfc-gh-sghosh sfc-gh-sghosh added status-triage Issue is under initial triage and removed needs triage Initial RCA is required labels Jan 13, 2025
@sfc-gh-sghosh
Copy link

Hello @ndevir ,

Thanks for raising the issue, we will look into it, meanwhile could you please use direct literals as below

`import snowflake.snowpark.functions as spf

df = session.create_dataframe(
data=[("this",)],
schema=["A"]
)

df.show()

df=df.with_column(
"B",
spf.replace(
spf.col("A"),
"this",
"that"
)
)

df.show()

df = df.with_column(
"B",
spf.replace(
spf.col("A"),
"this", # Just use the string directly
"that"
)
)

df.show()

output:


|"A" |

|this |


|"A" |"B" |

|this |that |


|"A" |"B" |

|this |that |
`

Regards,
Sujan

@ndevir
Copy link
Author

ndevir commented Jan 13, 2025

Hi @sfc-gh-sghosh,

thanks for the suggestion! This works in case we want to work with literals directly. However, we also require it to work with an iff inside the replace which fails with the same AssertionError (potentially again due to the @publicapi decorator) such as in the following example:

df.with_column(
    "B",
    spf.replace(
        spf.col("A"),
        spf.iff(
            spf.lit(True),
            spf.lit("this"),
            spf.lit("that")
        )
    )
)

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status-triage Issue is under initial triage
Projects
None yet
Development

No branches or pull requests

2 participants