Skip to content

Commit 138241c

Browse files
SNOW-1868288 log level to debug in chunk rowcount logging (#2127)
1 parent 343cc4b commit 138241c

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

DESCRIPTION.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
1111
- v3.12.5(TBD)
1212
- Added a feature to limit the sizes of IO-bound ThreadPoolExecutors during PUT and GET commands.
1313
- Adding support for the new PAT authentication method.
14-
- Updated README.md to include instructions on how to verify package signatures using `cosign`.
14+
- Updated README.md to include instructions on how to verify package signatures using `cosign`.
15+
- Updated the log level for cursor's chunk rowcount from INFO to DEBUG
1516

1617
- v3.12.4(December 3,2024)
1718
- Fixed a bug where multipart uploads to Azure would be missing their MD5 hashes.

src/snowflake/connector/cursor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ def _init_result_and_meta(self, data: dict[Any, Any]) -> None:
11641164
)
11651165

11661166
if not (is_dml or self.is_file_transfer):
1167-
logger.info(
1167+
logger.debug(
11681168
"Number of results in first chunk: %s", result_chunks[0].rowcount
11691169
)
11701170

test/integ/test_cursor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ def _type_from_description(named_access: bool):
154154

155155
@pytest.mark.skipolddriver
156156
def test_insert_select(conn, db_parameters, caplog):
157+
caplog.set_level(logging.DEBUG)
157158
"""Inserts and selects integer data."""
158159
with conn() as cnx:
159160
c = cnx.cursor()
@@ -198,6 +199,7 @@ def test_insert_select(conn, db_parameters, caplog):
198199

199200
@pytest.mark.skipolddriver
200201
def test_insert_and_select_by_separate_connection(conn, db_parameters, caplog):
202+
caplog.set_level(logging.DEBUG)
201203
"""Inserts a record and select it by a separate connection."""
202204
with conn() as cnx:
203205
result = cnx.cursor().execute(
@@ -933,6 +935,7 @@ def test_fetchmany(conn, db_parameters, caplog):
933935
assert c.rowcount == 6, "number of records"
934936

935937
with cnx.cursor() as c:
938+
caplog.set_level(logging.DEBUG)
936939
c.execute(f"select aa from {table_name} order by aa desc")
937940
assert "Number of results in first chunk: 6" in caplog.text
938941

0 commit comments

Comments
 (0)