-
Notifications
You must be signed in to change notification settings - Fork 142
Open
Labels
status-triage_doneInitial triage done, will be further handled by the driver teamInitial triage done, will be further handled by the driver team
Description
Please answer these questions before submitting your issue. Thanks!
- What version of Python are you using?
Python 3.11.10 (main, Mar 28 2025, 10:57:09) [Clang 16.0.0 (clang-1600.0.26.6)]
- What operating system and processor architecture are you using?
macOS-15.6.1-arm64-arm-64bit
- What are the component versions in the environment (
pip freeze)?
asn1crypto==1.5.1
backports.tarfile==1.2.0
boto3==1.40.19
botocore==1.40.19
build==1.3.0
CacheControl==0.14.3
certifi==2025.8.3
cffi==1.17.1
charset-normalizer==3.4.3
cleo==2.1.0
cloudpickle==3.0.0
crashtest==0.4.1
cryptography==45.0.6
distlib==0.4.0
dulwich==0.22.8
fastjsonschema==2.21.2
filelock==3.19.1
idna==3.10
importlib_metadata==8.7.0
installer==0.7.0
jaraco.classes==3.4.0
jaraco.context==6.0.1
jaraco.functools==4.3.0
jmespath==1.0.1
keyring==25.6.0
more-itertools==10.7.0
msgpack==1.1.1
packaging==25.0
pkginfo==1.12.1.2
platformdirs==4.4.0
poetry==2.0.0
poetry-core==2.0.0
protobuf==6.31.1
pycparser==2.22
PyJWT==2.10.1
pyOpenSSL==25.1.0
pyproject_hooks==1.2.0
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.2
RapidFuzz==3.14.0
requests==2.32.5
requests-toolbelt==1.0.0
s3transfer==0.13.1
shellingham==1.5.4
six==1.17.0
snowflake-connector-python==3.17.2
snowflake-snowpark-python==1.37.0
sortedcontainers==2.4.0
tomlkit==0.13.3
trove-classifiers==2025.8.26.11
typing_extensions==4.15.0
tzlocal==5.3.1
urllib3==2.5.0
virtualenv==20.34.0
xattr==1.2.0
zipp==3.23.0
- What did you do?
import os
from snowflake.snowpark import Session
def bug(session: Session):
session.sql(
"""
SELECT parse_json('{"entity": {"id":"id"}}') as some_col
where GET(some_col, ?) IS NOT NULL
""",
["entity"],
).limit(1000)
print("worked")
try:
session.sql(
"""
SELECT parse_json('{"entity": {"id":"id"}}') as some_col
where GET_PATH(some_col, ?) IS NOT NULL
""",
["entity"],
).limit(1000)
except Exception:
print("failed")
raise
def main():
session: Session = Session.builder.configs(
{
"account": os.environ["SNOWFLAKE_ACCOUNT"],
"warehouse": os.environ["SNOWFLAKE_WAREHOUSE"],
"database": os.environ["SNOWFLAKE_DATABASE"],
"schema": os.environ["SNOWFLAKE_SCHEMA"],
"role": os.environ["SNOWFLAKE_ROLE"],
"user": os.environ["SNOWFLAKE_USER"],
"authenticator": "externalbrowser",
"client_session_keep_alive": True,
}
).create()
bug(session)
if __name__ == "__main__":
main()- What did you expect to see?
In the reproduction, the first query works fine. But the second query (the one in the try breaks).
Ideally, GET_PATH would not break, like GET.
- Can you set logging to DEBUG and collect the logs?
2025-08-28 08:26:08,476 - MainThread config_manager.py:348 - read_config() - DEBUG - reading configuration file from /Users/USER/.snowflake/config.toml
2025-08-28 08:26:08,483 - MainThread connection.py:521 - __init__() - INFO - Snowflake Connector for Python Version: 3.17.2, Python Version: 3.11.10, Platform: macOS-15.6.1-arm64-arm-64bit
2025-08-28 08:26:08,483 - MainThread connection.py:920 - connect() - DEBUG - connect
2025-08-28 08:26:08,483 - MainThread connection.py:1386 - __config() - DEBUG - __config
2025-08-28 08:26:08,483 - MainThread connection.py:1464 - __config() - INFO - Connecting to GLOBAL Snowflake domain
2025-08-28 08:26:08,483 - MainThread connection.py:1597 - __config() - DEBUG - 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-08-28 08:26:08,483 - MainThread converter.py:156 - __init__() - DEBUG - use_numpy: False
2025-08-28 08:26:08,483 - MainThread connection.py:1140 - __open_connection() - DEBUG - REST API object was created: SOME-ACCOUNT.snowflakecomputing.com:443
2025-08-28 08:26:08,504 - MainThread _auth.py:154 - authenticate() - DEBUG - authenticate
2025-08-28 08:26:08,519 - ThreadPoolExecutor-0_3 connectionpool.py:246 - _new_conn() - DEBUG - Starting new HTTP connection (1): 169.254.169.254:80
2025-08-28 08:26:08,519 - ThreadPoolExecutor-0_5 connectionpool.py:246 - _new_conn() - DEBUG - Starting new HTTP connection (1): metadata.google.internal:80
2025-08-28 08:26:08,519 - ThreadPoolExecutor-0_4 connectionpool.py:246 - _new_conn() - DEBUG - Starting new HTTP connection (1): metadata.google.internal:80
2025-08-28 08:26:08,520 - ThreadPoolExecutor-0_2 connectionpool.py:246 - _new_conn() - DEBUG - Starting new HTTP connection (1): 169.254.169.254:80
2025-08-28 08:26:10,604 - MainThread _auth.py:196 - authenticate() - DEBUG - account=SOME-ACCOUNT, [email protected], database=DB, schema=schema, warehouse=WH, role=SYSADMIN, request_id=8fd7fd37-6857-4ac0-b28f-ccd903cb9ccb
2025-08-28 08:26:10,604 - MainThread _auth.py:229 - authenticate() - DEBUG - body['data']: {'CLIENT_APP_ID': 'PythonSnowpark', 'CLIENT_APP_VERSION': '1.37.0', 'SVN_REVISION': None, 'ACCOUNT_NAME': 'SOME-ACCOUNT', 'LOGIN_NAME': '[email protected]', 'CLIENT_ENVIRONMENT': {'APPLICATION': 'PythonSnowpark', 'APPLICATION_PATH': '/Users/USER/workspace/dev/snowflake-repro/main.py', 'OS': 'Darwin', 'OS_VERSION': 'macOS-15.6.1-arm64-arm-64bit', 'PYTHON_VERSION': '3.11.10', 'PYTHON_RUNTIME': 'CPython', 'PYTHON_COMPILER': 'Clang 16.0.0 (clang-1600.0.26.6)', 'OCSP_MODE': 'FAIL_OPEN', 'TRACING': 10, 'LOGIN_TIMEOUT': None, 'NETWORK_TIMEOUT': None, 'SOCKET_TIMEOUT': None, 'PLATFORM': ['is_azure_vm_timeout', 'has_azure_managed_identity_timeout']}, 'AUTHENTICATOR': 'ID_TOKEN', 'TOKEN': '******', 'SESSION_PARAMETERS': {'CLIENT_SESSION_KEEP_ALIVE': True, 'CLIENT_PREFETCH_THREADS': 4, 'CLIENT_STORE_TEMPORARY_CREDENTIAL': True}}
2025-08-28 08:26:10,604 - MainThread retry.py:351 - from_int() - DEBUG - Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
2025-08-28 08:26:10,604 - MainThread network.py:880 - _request_exec_wrapper() - DEBUG - remaining request timeout: N/A ms, retry cnt: 1
2025-08-28 08:26:10,604 - MainThread network.py:861 - add_request_guid() - DEBUG - Request guid: aa6f2cf9-0222-4028-80b5-624394fcc6da
2025-08-28 08:26:10,604 - MainThread network.py:1065 - _request_exec() - DEBUG - socket timeout: 60
2025-08-28 08:26:10,605 - MainThread connectionpool.py:1019 - _new_conn() - DEBUG - Starting new HTTPS connection (1): SOME-ACCOUNT.snowflakecomputing.com:443
2025-08-28 08:26:11,042 - MainThread ssl_wrap_socket.py:125 - ssl_wrap_socket_with_ocsp() - DEBUG - OCSP Mode: FAIL_OPEN, OCSP response cache file name: None
2025-08-28 08:26:11,062 - MainThread ocsp_snowflake.py:652 - reset_cache_dir() - DEBUG - cache directory: /Users/USER/Library/Caches/Snowflake
2025-08-28 08:26:11,062 - MainThread ocsp_snowflake.py:690 - reset_ocsp_response_cache_uri() - DEBUG - ocsp_response_cache_uri: file:///Users/USER/Library/Caches/Snowflake/ocsp_response_cache.json
2025-08-28 08:26:11,062 - MainThread ocsp_snowflake.py:693 - reset_ocsp_response_cache_uri() - DEBUG - OCSP_VALIDATION_CACHE size: 387
2025-08-28 08:26:11,062 - MainThread ocsp_snowflake.py:485 - reset_ocsp_dynamic_cache_server_url() - DEBUG - OCSP response cache server is enabled: http://ocsp.snowflakecomputing.com/ocsp_response_cache.json
2025-08-28 08:26:11,062 - MainThread ocsp_snowflake.py:498 - reset_ocsp_dynamic_cache_server_url() - DEBUG - OCSP dynamic cache server RETRY URL: None
2025-08-28 08:26:11,062 - MainThread ocsp_snowflake.py:1131 - validate() - DEBUG - validating certificate: SOME-ACCOUNT.snowflakecomputing.com
2025-08-28 08:26:11,062 - MainThread ocsp_asn1crypto.py:398 - extract_certificate_chain() - DEBUG - # of certificates: 3
2025-08-28 08:26:11,062 - MainThread ocsp_asn1crypto.py:87 - read_cert_bundle() - DEBUG - reading certificate bundle: /Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/certifi/cacert.pem
2025-08-28 08:26:11,070 - MainThread ocsp_asn1crypto.py:403 - extract_certificate_chain() - DEBUG - subject: OrderedDict([('country_name', 'US'), ('state_or_province_name', 'Montana'), ('locality_name', 'Bozeman'), ('organization_name', 'Snowflake Inc.'), ('common_name', '*.prod3.us-west-2.aws.snowflakecomputing.com')]), issuer: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('common_name', 'DigiCert Global G2 TLS RSA SHA256 2020 CA1')])
2025-08-28 08:26:11,070 - MainThread ocsp_asn1crypto.py:403 - 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-08-28 08:26:11,070 - MainThread ocsp_asn1crypto.py:408 - extract_certificate_chain() - DEBUG - A trusted root certificate found: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('common_name', 'DigiCert Global G2 TLS RSA SHA256 2020 CA1')]), stopping chain traversal here
2025-08-28 08:26:11,070 - MainThread ocsp_asn1crypto.py:432 - create_pair_issuer_subject() - DEBUG - not found issuer_der: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('organizational_unit_name', 'www.digicert.com'), ('common_name', 'DigiCert Global Root G2')])
2025-08-28 08:26:11,071 - MainThread ocsp_snowflake.py:890 - 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', '*.prod3.us-west-2.aws.snowflakecomputing.com')])
2025-08-28 08:26:11,071 - MainThread ocsp_snowflake.py:890 - 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-08-28 08:26:11,072 - MainThread ocsp_snowflake.py:1188 - _validate() - DEBUG - ok
2025-08-28 08:26:11,389 - MainThread connectionpool.py:474 - _make_request() - DEBUG - https://SOME-ACCOUNT.snowflakecomputing.com:443 "POST /session/v1/login-request?request_id=8fd7fd37-6857-4ac0-b28f-ccd903cb9ccb&databaseName=DB&schemaName=schema&warehouse=WH&roleName=SYSADMIN&request_guid=aa6f2cf9-0222-4028-80b5-624394fcc6da HTTP/1.1" 200 6473
2025-08-28 08:26:11,391 - MainThread network.py:1097 - _request_exec() - DEBUG - SUCCESS
2025-08-28 08:26:11,391 - MainThread network.py:740 - _post_request() - DEBUG - ret[code] = None, after post request
2025-08-28 08:26:11,391 - MainThread _auth.py:359 - authenticate() - DEBUG - completed authentication
2025-08-28 08:26:11,391 - MainThread _auth.py:418 - authenticate() - DEBUG - token = ******
2025-08-28 08:26:11,391 - MainThread _auth.py:426 - authenticate() - DEBUG - master_token = ******
2025-08-28 08:26:11,392 - MainThread _auth.py:434 - authenticate() - DEBUG - id_token = NULL
2025-08-28 08:26:11,392 - MainThread _auth.py:442 - authenticate() - DEBUG - mfa_token = NULL
2025-08-28 08:26:11,392 - MainThread connection.py:1999 - _add_heartbeat() - DEBUG - started heartbeat
2025-08-28 08:26:11,394 - MainThread connection.py:1061 - cursor() - DEBUG - cursor
2025-08-28 08:26:11,394 - MainThread utils.py:1016 - set_state() - DEBUG - Setting AST state. Current state: ast_enabled = True, state = 2. Request: source = 2, enable = False.
2025-08-28 08:26:11,395 - MainThread session.py:785 - __init__() - INFO - Snowpark Session information:
"version" : 1.37.0,
"python.version" : 3.11.10,
"python.connector.version" : 3.17.2,
"python.connector.session.id" : 18811574633616614,
"os.name" : Darwin
2025-08-28 08:26:11,404 - MainThread cursor.py:949 - execute() - DEBUG - executing SQL/command
2025-08-28 08:26:11,404 - MainThread cursor.py:968 - execute() - DEBUG - query: [SELECT parse_json('{"entity": {"id":"id"}}') as some_col where GET(some_col, ?) ...]
2025-08-28 08:26:11,404 - MainThread connection.py:1975 - _next_sequence_counter() - DEBUG - sequence counter: 1
2025-08-28 08:26:11,405 - MainThread cursor.py:667 - _execute_helper() - DEBUG - Request id: 2d5be7ad-84cc-4f0f-a879-0d08f34e6ca5
2025-08-28 08:26:11,405 - MainThread cursor.py:669 - _execute_helper() - DEBUG - running query [SELECT parse_json('{"entity": {"id":"id"}}') as some_col where GET(some_col, ?) ...]
2025-08-28 08:26:11,405 - MainThread cursor.py:676 - _execute_helper() - DEBUG - is_file_transfer: False
2025-08-28 08:26:11,405 - MainThread connection.py:1630 - cmd_query() - DEBUG - _cmd_query
2025-08-28 08:26:11,405 - MainThread _query_context_cache.py:152 - serialize_to_dict() - DEBUG - serialize_to_dict() called
2025-08-28 08:26:11,405 - MainThread connection.py:1659 - cmd_query() - DEBUG - sql=[SELECT parse_json('{"entity": {"id":"id"}}') as some_col where GET(some_col, ?) ...], sequence_id=[1], is_file_transfer=[False]
2025-08-28 08:26:11,405 - MainThread network.py:454 - request() - DEBUG - Opentelemtry otel injection failed
Traceback (most recent call last):
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/connector/network.py", line 448, in request
from opentelemetry.trace.propagation.tracecontext import (
ModuleNotFoundError: No module named 'opentelemetry'
2025-08-28 08:26:11,407 - MainThread network.py:880 - _request_exec_wrapper() - DEBUG - remaining request timeout: N/A ms, retry cnt: 1
2025-08-28 08:26:11,407 - MainThread network.py:861 - add_request_guid() - DEBUG - Request guid: bf3683ad-e414-4c6e-8a30-7c2d75ca9745
2025-08-28 08:26:11,407 - MainThread network.py:1065 - _request_exec() - DEBUG - socket timeout: 60
2025-08-28 08:26:11,630 - MainThread connectionpool.py:474 - _make_request() - DEBUG - https://SOME-ACCOUNT.snowflakecomputing.com:443 "POST /queries/v1/query-request?requestId=2d5be7ad-84cc-4f0f-a879-0d08f34e6ca5&request_guid=bf3683ad-e414-4c6e-8a30-7c2d75ca9745 HTTP/1.1" 200 None
2025-08-28 08:26:11,632 - MainThread network.py:1097 - _request_exec() - DEBUG - SUCCESS
2025-08-28 08:26:11,632 - MainThread network.py:740 - _post_request() - DEBUG - ret[code] = None, after post request
2025-08-28 08:26:11,632 - MainThread network.py:769 - _post_request() - DEBUG - Query id: 01beabea-0306-54a8-0042-d5071d7f9e92
2025-08-28 08:26:11,632 - MainThread _query_context_cache.py:188 - deserialize_json_dict() - DEBUG - deserialize_json_dict() called: data from server: {'entries': [{'id': 0, 'timestamp': 1756383971577913, 'priority': 0, 'context': 'CKKl5YBw'}]}
2025-08-28 08:26:11,632 - MainThread _query_context_cache.py:229 - deserialize_json_dict() - DEBUG - deserialize {'id': 0, 'timestamp': 1756383971577913, 'priority': 0, 'context': 'CKKl5YBw'}
2025-08-28 08:26:11,632 - MainThread _query_context_cache.py:98 - _sync_priority_map() - DEBUG - sync_priority_map called priority_map size = 0, new_priority_map size = 1
2025-08-28 08:26:11,632 - MainThread _query_context_cache.py:124 - trim_cache() - DEBUG - trim_cache() called. treeSet size is 1 and cache capacity is 5
2025-08-28 08:26:11,632 - MainThread _query_context_cache.py:133 - trim_cache() - DEBUG - trim_cache() returns. treeSet size is 1 and cache capacity is 5
2025-08-28 08:26:11,632 - MainThread _query_context_cache.py:268 - deserialize_json_dict() - DEBUG - deserialize_json_dict() returns
2025-08-28 08:26:11,633 - MainThread _query_context_cache.py:273 - log_cache_entries() - DEBUG - Cache Entry: (0, 1756383971577913, 0)
2025-08-28 08:26:11,633 - MainThread cursor.py:1026 - execute() - DEBUG - sfqid: 01beabea-0306-54a8-0042-d5071d7f9e92
2025-08-28 08:26:11,633 - MainThread cursor.py:1032 - execute() - DEBUG - query execution done
2025-08-28 08:26:11,633 - MainThread cursor.py:1046 - execute() - DEBUG - SUCCESS
2025-08-28 08:26:11,633 - MainThread cursor.py:1065 - execute() - DEBUG - PUT OR GET: False
2025-08-28 08:26:11,633 - MainThread cursor.py:1197 - _init_result_and_meta() - DEBUG - Query result format: arrow
2025-08-28 08:26:11,633 - MainThread cursor.py:1211 - _init_result_and_meta() - DEBUG - Number of results in first chunk: 0
2025-08-28 08:26:11,636 - MainThread cursor.py:949 - execute() - DEBUG - executing SQL/command
2025-08-28 08:26:11,636 - MainThread cursor.py:968 - execute() - DEBUG - query: [SELECT parse_json('{"entity": {"id":"id"}}') as some_col where GET_PATH(some_col...]
2025-08-28 08:26:11,636 - MainThread connection.py:1975 - _next_sequence_counter() - DEBUG - sequence counter: 2
2025-08-28 08:26:11,636 - MainThread cursor.py:667 - _execute_helper() - DEBUG - Request id: d1d2d491-7cb5-42fc-a586-94d22722e662
2025-08-28 08:26:11,636 - MainThread cursor.py:669 - _execute_helper() - DEBUG - running query [SELECT parse_json('{"entity": {"id":"id"}}') as some_col where GET_PATH(some_col...]
2025-08-28 08:26:11,636 - MainThread cursor.py:676 - _execute_helper() - DEBUG - is_file_transfer: False
2025-08-28 08:26:11,636 - MainThread connection.py:1630 - cmd_query() - DEBUG - _cmd_query
2025-08-28 08:26:11,636 - MainThread _query_context_cache.py:152 - serialize_to_dict() - DEBUG - serialize_to_dict() called
2025-08-28 08:26:11,636 - MainThread _query_context_cache.py:273 - log_cache_entries() - DEBUG - Cache Entry: (0, 1756383971577913, 0)
2025-08-28 08:26:11,636 - MainThread _query_context_cache.py:177 - serialize_to_dict() - DEBUG - serialize_to_dict(): data to send to server {'entries': [{'id': 0, 'timestamp': 1756383971577913, 'priority': 0, 'context': {'base64Data': 'CKKl5YBw'}}]}
2025-08-28 08:26:11,636 - MainThread connection.py:1659 - cmd_query() - DEBUG - sql=[SELECT parse_json('{"entity": {"id":"id"}}') as some_col where GET_PATH(some_col...], sequence_id=[2], is_file_transfer=[False]
2025-08-28 08:26:11,637 - MainThread network.py:454 - request() - DEBUG - Opentelemtry otel injection failed
Traceback (most recent call last):
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/connector/network.py", line 448, in request
from opentelemetry.trace.propagation.tracecontext import (
ModuleNotFoundError: No module named 'opentelemetry'
2025-08-28 08:26:11,637 - MainThread network.py:880 - _request_exec_wrapper() - DEBUG - remaining request timeout: N/A ms, retry cnt: 1
2025-08-28 08:26:11,637 - MainThread network.py:861 - add_request_guid() - DEBUG - Request guid: 72ecc2f3-ccfe-42c7-a0eb-bcbde558e03a
2025-08-28 08:26:11,637 - MainThread network.py:1065 - _request_exec() - DEBUG - socket timeout: 60
2025-08-28 08:26:11,799 - MainThread connectionpool.py:474 - _make_request() - DEBUG - https://SOME-ACCOUNT.snowflakecomputing.com:443 "POST /queries/v1/query-request?requestId=d1d2d491-7cb5-42fc-a586-94d22722e662&request_guid=72ecc2f3-ccfe-42c7-a0eb-bcbde558e03a HTTP/1.1" 200 None
2025-08-28 08:26:11,800 - MainThread network.py:1097 - _request_exec() - DEBUG - SUCCESS
2025-08-28 08:26:11,800 - MainThread network.py:740 - _post_request() - DEBUG - ret[code] = 001840, after post request
2025-08-28 08:26:11,800 - MainThread network.py:769 - _post_request() - DEBUG - Query id: 01beabea-0306-5423-0042-d5071d7fb8b2
2025-08-28 08:26:11,800 - MainThread cursor.py:1026 - execute() - DEBUG - sfqid: 01beabea-0306-5423-0042-d5071d7fb8b2
2025-08-28 08:26:11,800 - MainThread cursor.py:1032 - execute() - DEBUG - query execution done
2025-08-28 08:26:11,801 - MainThread cursor.py:1113 - execute() - DEBUG - {'data': {'internalError': False, 'unredactedFromSecureObject': False, 'errorCode': '001840', 'age': 0, 'sqlState': '22023', 'queryId': '01beabea-0306-5423-0042-d5071d7fb8b2', 'line': -1, 'pos': -1, 'type': 'COMPILATION'}, 'code': '001840', 'message': "Invalid extraction path '1': invalid field at position 0.", 'success': False, 'headers': None}
worked
failed
Traceback (most recent call last):
File "/Users/USER/workspace/dev/snowflake-repro/main.py", line 57, in <module>
main()
File "/Users/USER/workspace/dev/snowflake-repro/main.py", line 40, in main
bug(session)
File "/Users/USER/workspace/dev/snowflake-repro/main.py", line 21, in bug
).limit(1000)
^^^^^^^^^^^
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/telemetry.py", line 374, in wrap
r = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/utils.py", line 1131, in call_wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/snowpark/dataframe.py", line 2960, in limit
self._select_statement.limit(n, offset=offset), _ast_stmt=stmt
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/analyzer/select_statement.py", line 1694, in limit
new.column_states = self.column_states
^^^^^^^^^^^^^^^^^^
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/analyzer/select_statement.py", line 975, in column_states
self.column_states = self.from_.column_states
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/analyzer/select_statement.py", line 482, in column_states
column_attrs = self.snowflake_plan.attributes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/analyzer/snowflake_plan.py", line 602, in attributes
attributes = self._analyze_attributes()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/analyzer/snowflake_plan.py", line 425, in wrap
raise ne.with_traceback(tb) from None
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/analyzer/snowflake_plan.py", line 178, in wrap
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/analyzer/snowflake_plan.py", line 593, in _analyze_attributes
return analyze_attributes(self.schema_query, self.session, self.uuid)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/analyzer/schema_utils.py", line 107, in analyze_attributes
attributes = session._get_result_attributes(sql)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/snowpark/session.py", line 2911, in _get_result_attributes
return self._conn.get_result_attributes(query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/server_connection.py", line 272, in get_result_attributes
self._run_new_describe(self._cursor, query), self.max_string_size
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/server_connection.py", line 278, in _run_new_describe
result_metadata = run_new_describe(cursor, query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/snowpark/_internal/analyzer/schema_utils.py", line 177, in run_new_describe
return cursor._describe_internal(query) # pyright: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/connector/cursor.py", line 1182, in _describe_internal
self.execute(*args, **kwargs)
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/connector/cursor.py", line 1142, in execute
Error.errorhandler_wrapper(self.connection, self, error_class, errvalue)
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/connector/errors.py", line 286, in errorhandler_wrapper
handed_over = Error.hand_to_other_handler(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/connector/errors.py", line 341, in hand_to_other_handler
cursor.errorhandler(connection, cursor, error_class, error_value)
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/connector/errors.py", line 217, in default_errorhandler
raise error_class(
snowflake.snowpark.exceptions.SnowparkSQLException: (1304): 01beabea-0306-5423-0042-d5071d7fb8b2: 001840 (22023): 01beabea-0306-5423-0042-d5071d7fb8b2: Invalid extraction path '1': invalid field at position 0.
2025-08-28 08:26:11,811 - MainThread session.py:901 - close() - INFO - Closing session: 18811574633616614
2025-08-28 08:26:11,811 - MainThread session.py:1188 - cancel_all() - INFO - Canceling all running queries
2025-08-28 08:26:11,811 - MainThread cursor.py:949 - execute() - DEBUG - executing SQL/command
2025-08-28 08:26:11,811 - MainThread cursor.py:968 - execute() - DEBUG - query: [select system$cancel_all_queries(18811574633616614)]
2025-08-28 08:26:11,811 - MainThread connection.py:1975 - _next_sequence_counter() - DEBUG - sequence counter: 3
2025-08-28 08:26:11,811 - MainThread cursor.py:667 - _execute_helper() - DEBUG - Request id: a60bf7d2-d49f-45d7-a150-91c804ffa174
2025-08-28 08:26:11,811 - MainThread cursor.py:669 - _execute_helper() - DEBUG - running query [select system$cancel_all_queries(18811574633616614)]
2025-08-28 08:26:11,812 - MainThread cursor.py:676 - _execute_helper() - DEBUG - is_file_transfer: False
2025-08-28 08:26:11,812 - MainThread connection.py:1630 - cmd_query() - DEBUG - _cmd_query
2025-08-28 08:26:11,812 - MainThread _query_context_cache.py:152 - serialize_to_dict() - DEBUG - serialize_to_dict() called
2025-08-28 08:26:11,812 - MainThread _query_context_cache.py:273 - log_cache_entries() - DEBUG - Cache Entry: (0, 1756383971577913, 0)
2025-08-28 08:26:11,812 - MainThread _query_context_cache.py:177 - serialize_to_dict() - DEBUG - serialize_to_dict(): data to send to server {'entries': [{'id': 0, 'timestamp': 1756383971577913, 'priority': 0, 'context': {'base64Data': 'CKKl5YBw'}}]}
2025-08-28 08:26:11,812 - MainThread connection.py:1659 - cmd_query() - DEBUG - sql=[select system$cancel_all_queries(18811574633616614)], sequence_id=[3], is_file_transfer=[False]
2025-08-28 08:26:11,812 - MainThread network.py:454 - request() - DEBUG - Opentelemtry otel injection failed
Traceback (most recent call last):
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/connector/network.py", line 448, in request
from opentelemetry.trace.propagation.tracecontext import (
ModuleNotFoundError: No module named 'opentelemetry'
2025-08-28 08:26:11,812 - MainThread network.py:880 - _request_exec_wrapper() - DEBUG - remaining request timeout: N/A ms, retry cnt: 1
2025-08-28 08:26:11,812 - MainThread network.py:861 - add_request_guid() - DEBUG - Request guid: e80cea6c-2cd2-4d59-aa6e-d540d6315c4c
2025-08-28 08:26:11,813 - MainThread network.py:1065 - _request_exec() - DEBUG - socket timeout: 60
2025-08-28 08:26:12,033 - MainThread connectionpool.py:474 - _make_request() - DEBUG - https://SOME-ACCOUNT.snowflakecomputing.com:443 "POST /queries/v1/query-request?requestId=a60bf7d2-d49f-45d7-a150-91c804ffa174&request_guid=e80cea6c-2cd2-4d59-aa6e-d540d6315c4c HTTP/1.1" 200 None
2025-08-28 08:26:12,035 - MainThread network.py:1097 - _request_exec() - DEBUG - SUCCESS
2025-08-28 08:26:12,036 - MainThread network.py:740 - _post_request() - DEBUG - ret[code] = None, after post request
2025-08-28 08:26:12,036 - MainThread network.py:769 - _post_request() - DEBUG - Query id: 01beabea-0306-5608-0042-d5071d7fd8ee
2025-08-28 08:26:12,036 - MainThread _query_context_cache.py:188 - deserialize_json_dict() - DEBUG - deserialize_json_dict() called: data from server: {'entries': [{'id': 0, 'timestamp': 1756383972043747, 'priority': 0, 'context': 'CKKw5YBw'}]}
2025-08-28 08:26:12,036 - MainThread _query_context_cache.py:273 - log_cache_entries() - DEBUG - Cache Entry: (0, 1756383971577913, 0)
2025-08-28 08:26:12,036 - MainThread _query_context_cache.py:229 - deserialize_json_dict() - DEBUG - deserialize {'id': 0, 'timestamp': 1756383972043747, 'priority': 0, 'context': 'CKKw5YBw'}
2025-08-28 08:26:12,036 - MainThread _query_context_cache.py:98 - _sync_priority_map() - DEBUG - sync_priority_map called priority_map size = 0, new_priority_map size = 1
2025-08-28 08:26:12,036 - MainThread _query_context_cache.py:124 - trim_cache() - DEBUG - trim_cache() called. treeSet size is 1 and cache capacity is 5
2025-08-28 08:26:12,036 - MainThread _query_context_cache.py:133 - trim_cache() - DEBUG - trim_cache() returns. treeSet size is 1 and cache capacity is 5
2025-08-28 08:26:12,036 - MainThread _query_context_cache.py:268 - deserialize_json_dict() - DEBUG - deserialize_json_dict() returns
2025-08-28 08:26:12,036 - MainThread _query_context_cache.py:273 - log_cache_entries() - DEBUG - Cache Entry: (0, 1756383972043747, 0)
2025-08-28 08:26:12,037 - MainThread cursor.py:1026 - execute() - DEBUG - sfqid: 01beabea-0306-5608-0042-d5071d7fd8ee
2025-08-28 08:26:12,037 - MainThread cursor.py:1032 - execute() - DEBUG - query execution done
2025-08-28 08:26:12,037 - MainThread cursor.py:1046 - execute() - DEBUG - SUCCESS
2025-08-28 08:26:12,037 - MainThread cursor.py:1065 - execute() - DEBUG - PUT OR GET: False
2025-08-28 08:26:12,037 - MainThread cursor.py:1197 - _init_result_and_meta() - DEBUG - Query result format: arrow
2025-08-28 08:26:12,037 - MainThread cursor.py:1211 - _init_result_and_meta() - DEBUG - Number of results in first chunk: 1
2025-08-28 08:26:12,037 - MainThread server_connection.py:522 - run_query() - DEBUG - Execute query [queryID: 01beabea-0306-5608-0042-d5071d7fd8ee] select system$cancel_all_queries(18811574633616614)
2025-08-28 08:26:12,037 - MainThread result_batch.py:67 - _create_nanoarrow_iterator() - DEBUG - Using nanoarrow as the arrow data converter
2025-08-28 08:26:12,038 - MainThread CArrowIterator.cpp:116 - CArrowIterator() - DEBUG - Arrow BatchSize: 1
2025-08-28 08:26:12,038 - MainThread CArrowChunkIterator.cpp:46 - CArrowChunkIterator() - DEBUG - Arrow chunk info: batchCount 1, columnCount 1, use_numpy: 0
2025-08-28 08:26:12,038 - MainThread nanoarrow_arrow_iterator.cpython-311-darwin.so:0 - __cinit__() - DEBUG - Batches read: 0
2025-08-28 08:26:12,038 - MainThread result_set.py:110 - result_set_iterator() - DEBUG - beginning to schedule result batch downloads
2025-08-28 08:26:12,038 - MainThread CArrowChunkIterator.cpp:70 - next() - DEBUG - Current batch index: 0, rows in current batch: 1
2025-08-28 08:26:12,038 - MainThread connection.py:2007 - _cancel_heartbeat() - DEBUG - stopped heartbeat
2025-08-28 08:26:12,038 - MainThread connection.py:989 - close() - DEBUG - closed
2025-08-28 08:26:12,038 - MainThread telemetry.py:209 - close() - DEBUG - Closing telemetry client.
2025-08-28 08:26:12,041 - MainThread telemetry.py:174 - send_batch() - DEBUG - Sending 1 logs to telemetry. Data is {'logs': [{'message': {'driver_type': 'PythonConnector', 'driver_version': '3.17.2', 'source': 'PythonSnowpark', 'type': 'client_imported_packages', 'value': "{'builtins', 'heapq', 'enum', 'queue', 're', 'tokenize', 'posixpath', 'urllib3', 'copyreg', 'functools', 'cython_runtime', 'pathlib', 'plistlib', 'zlib', 'calendar', 'grp', 'locale', 'array', 'tempfile', 'bisect', 'json', 'fnmatch', 'codecs', 'dateutil', 'fcntl', 'cryptography', 'OpenSSL', 'multiprocessing', 'dis', 'ssl', 'datetime', 'gzip', 'webbrowser', 'typing_extensions', 'linecache', 'contextlib', 'bz2', 'hashlib', 'ntpath', 'errno', 'os', 'argparse', 'traceback', 'getpass', 'uuid', 'jaraco', 'opcode', 'zipp', 'stringprep', 'requests', 'contextvars', 'boto3', 'io', 'statistics', 'concurrent', 'selectors', 'inspect', 'signal', 'pprint', 'xml', 'netrc', 'logging', 'pytz', 'genericpath', 'urllib', 'idna', 'sortedcontainers', 'filelock', 'six', 'string', 'keyword', 'atexit', 'pyexpat', 'certifi', 'yaml', 'lzma', 'select', 'threading', 'asn1crypto', 'struct', 'encodings', 'email', 'termios', 'numbers', 'configparser', 'pickle', 'keyring', 'sysconfig', 'shutil', 'csv', 'secrets', 'pkgutil', 'platform', 'unicodedata', 'botocore', 'gettext', 'html', 'types', 'glob', 'packaging', 'zipfile', 'platformdirs', 'jmespath', 'tomlkit', 'google', 'math', 'fractions', 'unittest', 'cloudpickle', 'ctypes', 'textwrap', 'weakref', 'zoneinfo', 'quopri', 'base64', 'mimetypes', 'difflib', 'itertools', 'binascii', 'ipaddress', 'abc', 'socket', 'backports', 'http', 'typing', 'subprocess', 'pwd'**** 'sys', 'importlib_metadata', 'hmac', 'token', 'more_itertools', 'copy', 'snowflake', 'collections', 'importlib', 'reprlib', 'tzlocal', 'ast', 'site', 'posix', 'operator', 'time', 'dataclasses', 'decimal', 'shlex', 'jwt', 'random', 'stat', 'zipimport', 'asyncio', 'warnings', 'marshal', 'charset_normalizer'}"}, 'timestamp': '1756383971393'}, {'message': {'source': 'PythonSnowpark', 'version': '1.37.0', 'python_version': '3.11.10', 'operating_system': 'Darwin', 'type': 'snowpark_session_created', 'interactive': 0, 'data': {'start_time': 1756383971394, 'created_by_snowpark': 1}}, 'timestamp': '1756383971394'}, {'message': {'source': 'PythonSnowpark', 'version': '1.37.0', 'python_version': '3.11.10', 'operating_system': 'Darwin', 'type': 'snowpark_cursor_created', 'interactive': 0, 'data': {'session_id': 18811574633616614, 'thread_ident': 8710709440}}, 'timestamp': '1756383971394'}, {'message': {'driver_type': 'PythonConnector', 'driver_version': '3.17.2', 'source': 'PythonSnowpark', 'type': 'client_time_consume_first_result', 'query_id': '01beabea-0306-54a8-0042-d5071d7f9e92', 'value': 48}, 'timestamp': '1756383971633'}, {'message': {'source': 'PythonSnowpark', 'version': '1.37.0', 'python_version': '3.11.10', 'operating_system': 'Darwin', 'type': 'snowpark_describe_query_details', 'interactive': 0, 'data': {'session_id': 18811574633616614, 'sql_text': '\n SELECT parse_json(\'{"entity": {"id":"id"}}\') as some_col\n where GET(some_col, ?) IS NOT NULL\n ', 'e2e_time': 0.22934045901638456, 'stack_trace': ['r = func(*args, **kwargs)', 'return func(*args, **kwargs)', 'self._select_statement.limit(n, offset=offset), _ast_stmt=stmt', 'new.column_states = self.column_states', 'self.column_states = self.from_.column_states', 'column_attrs = self.snowflake_plan.attributes', 'attributes = self._analyze_attributes()', 'return func(*args, **kwargs)', 'return analyze_attributes(self.schema_query, self.session, self.uuid)']}}, 'timestamp': '1756383971633'}, {'message': {'driver_type': 'PythonConnector', 'driver_version': '3.17.2', 'source': 'PythonSnowpark', 'Stacktrace': MaskedMessageData(is_masked=False, masked_text=' File "snowflake/connector/cursor.py", line 1182, in _describe_internal\n File "snowflake/connector/cursor.py", line 1142, in execute\n File "snowflake/connector/errors.py", line 286, in errorhandler_wrapper\n File "snowflake/connector/errors.py", line 341, in hand_to_other_handler\n File "snowflake/connector/errors.py", line 217, in default_errorhandler\n', error_str=None), 'query_id': '01beabea-0306-5423-0042-d5071d7fb8b2', 'sql_state': '22023', 'reason': '001840 (22023)', 'ErrorNumber': '1840', 'ErrorMessage': "001840 (22023): 01beabea-0306-5423-0042-d5071d7fb8b2: Invalid extraction path '1': invalid field at position 0.", 'type': 'client_sql_exception', 'exception': 'ProgrammingError'}, 'timestamp': '1756383971805'}, {'message': {'driver_type': 'PythonConnector', 'driver_version': '3.17.2', 'source': 'PythonSnowpark', 'type': 'client_time_consume_first_result', 'query_id': '01beabea-0306-5608-0042-d5071d7fd8ee', 'value': -20}, 'timestamp': '1756383972037'}, {'message': {'driver_type': 'PythonConnector', 'driver_version': '3.17.2', 'source': 'PythonSnowpark', 'type': 'client_time_consume_last_result', 'query_id': '01beabea-0306-5608-0042-d5071d7fd8ee', 'value': 1}, 'timestamp': '1756383972038'}, {'message': {'source': 'PythonSnowpark', 'version': '1.37.0', 'python_version': '3.11.10', 'operating_system': 'Darwin', 'type': 'snowpark_temp_table_cleanup', 'interactive': 0, 'data': {'session_id': 18811574633616614, 'temp_table_cleaner_enabled': False, 'num_temp_tables_cleaned': 0, 'num_temp_tables_created': 0}}, 'timestamp': '1756383972038'}]}.
2025-08-28 08:26:12,042 - MainThread network.py:454 - request() - DEBUG - Opentelemtry otel injection failed
Traceback (most recent call last):
File "/Users/USER/workspace/dev/snowflake-repro/venv/lib/python3.11/site-packages/snowflake/connector/network.py", line 448, in request
from opentelemetry.trace.propagation.tracecontext import (
ModuleNotFoundError: No module named 'opentelemetry'
2025-08-28 08:26:12,042 - MainThread network.py:880 - _request_exec_wrapper() - DEBUG - remaining request timeout: 5000 ms, retry cnt: 1
2025-08-28 08:26:12,043 - MainThread network.py:861 - add_request_guid() - DEBUG - Request guid: adb3c3c6-286a-4f12-8a2c-b6510055042c
2025-08-28 08:26:12,043 - MainThread network.py:1065 - _request_exec() - DEBUG - socket timeout: 60
2025-08-28 08:26:12,232 - MainThread connectionpool.py:474 - _make_request() - DEBUG - https://SOME-ACCOUNT.snowflakecomputing.com:443 "POST /telemetry/send?request_guid=adb3c3c6-286a-4f12-8a2c-b6510055042c HTTP/1.1" 200 None
2025-08-28 08:26:12,232 - MainThread network.py:1097 - _request_exec() - DEBUG - SUCCESS
2025-08-28 08:26:12,232 - MainThread network.py:740 - _post_request() - DEBUG - ret[code] = None, after post request
2025-08-28 08:26:12,232 - MainThread telemetry.py:198 - send_batch() - DEBUG - Successfully uploading metrics to telemetry.
2025-08-28 08:26:12,232 - MainThread connection.py:995 - close() - DEBUG - No async queries seem to be running, deleting session
2025-08-28 08:26:12,233 - MainThread network.py:880 - _request_exec_wrapper() - DEBUG - remaining request timeout: 5000 ms, retry cnt: 1
2025-08-28 08:26:12,233 - MainThread network.py:861 - add_request_guid() - DEBUG - Request guid: 6a1431a5-0ccc-4de9-87c0-a62a22a62d54
2025-08-28 08:26:12,233 - MainThread network.py:1065 - _request_exec() - DEBUG - socket timeout: 60
2025-08-28 08:26:12,380 - MainThread connectionpool.py:474 - _make_request() - DEBUG - https://SOME-ACCOUNT.snowflakecomputing.com:443 "POST /session?delete=true&request_guid=6a1431a5-0ccc-4de9-87c0-a62a22a62d54 HTTP/1.1" 200 None
2025-08-28 08:26:12,381 - MainThread network.py:1097 - _request_exec() - DEBUG - SUCCESS
2025-08-28 08:26:12,381 - MainThread network.py:740 - _post_request() - DEBUG - ret[code] = None, after post request
2025-08-28 08:26:12,382 - MainThread _query_context_cache.py:138 - clear_cache() - DEBUG - clear_cache() called
2025-08-28 08:26:12,382 - MainThread connection.py:1008 - close() - DEBUG - Session is closed
2025-08-28 08:26:12,382 - MainThread session.py:910 - close() - INFO - Closed session: 18811574633616614
Metadata
Metadata
Assignees
Labels
status-triage_doneInitial triage done, will be further handled by the driver teamInitial triage done, will be further handled by the driver team