From 37b778d90dec7850a9ac5bf3f58fc0fce922a488 Mon Sep 17 00:00:00 2001 From: Eric Vandenberg Date: Mon, 16 Sep 2024 16:34:19 -0700 Subject: [PATCH] Update --- src/snowflake/snowpark/session.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/snowflake/snowpark/session.py b/src/snowflake/snowpark/session.py index e996f4377ed..9d26ce5ad23 100644 --- a/src/snowflake/snowpark/session.py +++ b/src/snowflake/snowpark/session.py @@ -3466,11 +3466,14 @@ def query_history(self, include_describe: bool = False) -> QueryHistory: Args: include_describe: Include query notifications for describe queries - >>> with session.query_history() as query_history: + >>> with session.query_history(True) as query_history: ... df = session.create_dataframe([[1, 2], [3, 4]], schema=["a", "b"]) ... df = df.filter(df.a == 1) ... res = df.collect() - >>> assert len(query_history.queries) == 1 + >>> assert len(query_history.queries) == 2 + >>> assert query_history.queries[0].is_describe + >>> assert query_history.queries[1].is_describe + >>> assert not query_history.queries[2].is_describe """ query_listener = QueryHistory(self, include_describe) self._conn.add_query_listener(query_listener)