You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/08/04 23:35:10 UTC

(superset) branch master updated: fix(core): reduce metric expression log noise (#42619)

This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 33c386a2d6f fix(core): reduce metric expression log noise (#42619)
33c386a2d6f is described below

commit 33c386a2d6f3288ce6260ad451df9135030df847
Author: Amin Ghadersohi <am...@gmail.com>
AuthorDate: Tue Aug 4 19:35:02 2026 -0400

    fix(core): reduce metric expression log noise (#42619)
---
 superset/utils/core.py                   | 2 +-
 tests/unit_tests/utils/map_type_tests.py | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/superset/utils/core.py b/superset/utils/core.py
index 09129c64eed..deb17ca80cc 100644
--- a/superset/utils/core.py
+++ b/superset/utils/core.py
@@ -1797,7 +1797,7 @@ def get_metric_type_from_column(column: Any, datasource: Explorable) -> str:
         operation = match.group(1)
         return METRIC_MAP_TYPE.get(operation, "")
 
-    logger.warning("Unexpected metric expression type: %s", expression)
+    logger.debug("Unexpected metric expression type: %s", expression)
     return ""
 
 
diff --git a/tests/unit_tests/utils/map_type_tests.py b/tests/unit_tests/utils/map_type_tests.py
index b076880e147..b1d770672ec 100644
--- a/tests/unit_tests/utils/map_type_tests.py
+++ b/tests/unit_tests/utils/map_type_tests.py
@@ -42,9 +42,11 @@ def test_column_with_invalid_operation():
     metric = SqlMetric(metric_name="my_column", expression="INVALID(my_column)")
     datasource = MagicMock(metrics=[metric])
     column = "my_column"
-    with patch("superset.utils.core.logger.warning") as mock_warning:
+    with patch("superset.utils.core.logger.debug") as mock_debug:
         assert (get_metric_type_from_column(column, datasource)) == ""
-        mock_warning.assert_called_once()
+        mock_debug.assert_called_once_with(
+            "Unexpected metric expression type: %s", "INVALID(my_column)"
+        )
 
 
 def test_empty_datasource():