Repository: great-expectations/great_expectations

Issue:
Use cleaner solution for non-truncating division in python 2
Prefer `from __future__ import division` to `1.*x/y`


Discussion:
Done inline during improve_partitions push.

Resolving patch:
diff --git a/great_expectations/execution_engine/execution_engine.py b/great_expectations/execution_engine/execution_engine.py
--- a/great_expectations/execution_engine/execution_engine.py
+++ b/great_expectations/execution_engine/execution_engine.py
@@ -419,10 +419,10 @@ def resolve_metrics(  # noqa: C901 - 16
         if len(metric_fn_bundle) > 0:
             try:
                 # an engine-specific way of computing metrics together
-                new_resolved: Dict[
+                resolved_metric_bundle: Dict[
                     Tuple[str, str, str], MetricValue
                 ] = self.resolve_metric_bundle(metric_fn_bundle=metric_fn_bundle)
-                resolved_metrics.update(new_resolved)
+                resolved_metrics.update(resolved_metric_bundle)
             except Exception as e:
                 raise ge_exceptions.MetricResolutionError(
                     message=str(e),
diff --git a/great_expectations/expectations/metrics/map_metric_provider.py b/great_expectations/expectations/metrics/map_metric_provider.py
--- a/great_expectations/expectations/metrics/map_metric_provider.py
+++ b/great_expectations/expectations/metrics/map_metric_provider.py
@@ -3062,7 +3062,7 @@ def _register_metric_functions(cls):
                         if domain_type == MetricDomainTypes.COLUMN:
                             register_metric(
                                 metric_name=metric_name
-                                + ".unexpected_count.aggregate_fn",
+                                + f".unexpected_count.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
                                 metric_domain_keys=metric_domain_keys,
                                 metric_value_keys=metric_value_keys,
                                 execution_engine=engine,
@@ -3181,7 +3181,7 @@ def _register_metric_functions(cls):
                         if domain_type == MetricDomainTypes.COLUMN:
                             register_metric(
                                 metric_name=metric_name
-                                + ".unexpected_count.aggregate_fn",
+                                + f".unexpected_count.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
                                 metric_domain_keys=metric_domain_keys,
                                 metric_value_keys=metric_value_keys,
                                 execution_engine=engine,
@@ -3318,13 +3318,16 @@ def _get_evaluation_dependencies(
         metric_suffix = ".unexpected_count"
         if metric_name.endswith(metric_suffix):
             try:
-                _ = get_metric_provider(f"{metric_name}.aggregate_fn", execution_engine)
+                _ = get_metric_provider(
+                    f"{metric_name}.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
+                    execution_engine,
+                )
                 has_aggregate_fn = True
             except ge_exceptions.MetricProviderError:
                 has_aggregate_fn = False
             if has_aggregate_fn:
                 dependencies["metric_partial_fn"] = MetricConfiguration(
-                    metric_name=f"{metric_name}.aggregate_fn",
+                    metric_name=f"{metric_name}.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
                     metric_domain_kwargs=metric.metric_domain_kwargs,
                     metric_value_kwargs=base_metric_value_kwargs,
                 )
@@ -3337,7 +3340,7 @@ def _get_evaluation_dependencies(
 
         # MapMetric uses "condition" metric to build "unexpected_count.aggregate_fn" and other listed metrics as well.
         for metric_suffix in [
-            ".unexpected_count.aggregate_fn",
+            f".unexpected_count.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
             ".unexpected_value_counts",
             ".unexpected_index_query",
             ".unexpected_index_list",
diff --git a/great_expectations/validator/validator.py b/great_expectations/validator/validator.py
--- a/great_expectations/validator/validator.py
+++ b/great_expectations/validator/validator.py
@@ -1112,7 +1112,7 @@ def _generate_metric_dependency_subgraphs_for_each_expectation_configuration(
             try:
                 expectation_validation_graph: ExpectationValidationGraph = ExpectationValidationGraph(
                     configuration=evaluated_config,
-                    graph=self.metrics_calculator.build_metric_dependency_graph(
+                    graph=self._metrics_calculator.build_metric_dependency_graph(
                         metric_configurations=validation_dependencies.get_metric_configurations(),
                         runtime_configuration=runtime_configuration,
                     ),
@@ -1179,7 +1179,7 @@ def _resolve_suite_level_graph_and_process_metric_evaluation_errors(
         (
             resolved_metrics,
             aborted_metrics_info,
-        ) = self.metrics_calculator.resolve_validation_graph(
+        ) = self._metrics_calculator.resolve_validation_graph(
             graph=graph,
             runtime_configuration=runtime_configuration,
             min_graph_edges_pbar_enable=0,


Test patch:
diff --git a/tests/conftest.py b/tests/conftest.py
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -66,6 +66,9 @@
     get_filesystem_one_level_directory_glob_path_list,
 )
 from great_expectations.datasource.new_datasource import BaseDatasource, Datasource
+from great_expectations.execution_engine.execution_engine import (
+    MetricPartialFunctionTypes,
+)
 from great_expectations.rule_based_profiler.config import RuleBasedProfilerConfig
 from great_expectations.rule_based_profiler.config.base import (
     ruleBasedProfilerConfigSchema,
@@ -7113,7 +7116,7 @@ def table_row_count_metric_config() -> MetricConfiguration:
 @pytest.fixture
 def table_row_count_aggregate_fn_metric_config() -> MetricConfiguration:
     return MetricConfiguration(
-        metric_name="table.row_count.aggregate_fn",
+        metric_name=f"table.row_count.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={},
         metric_value_kwargs=None,
     )
diff --git a/tests/execution_engine/test_sparkdf_execution_engine.py b/tests/execution_engine/test_sparkdf_execution_engine.py
--- a/tests/execution_engine/test_sparkdf_execution_engine.py
+++ b/tests/execution_engine/test_sparkdf_execution_engine.py
@@ -10,6 +10,9 @@
 from great_expectations.core.batch_spec import PathBatchSpec, RuntimeDataBatchSpec
 from great_expectations.core.metric_domain_types import MetricDomainTypes
 from great_expectations.execution_engine import SparkDFExecutionEngine
+from great_expectations.execution_engine.execution_engine import (
+    MetricPartialFunctionTypes,
+)
 from great_expectations.expectations.row_conditions import (
     RowCondition,
     RowConditionParserType,
@@ -733,7 +736,7 @@ def test_sparkdf_batch_aggregate_metrics(caplog, spark_session):
     metrics.update(results)
 
     desired_aggregate_fn_metric_1 = MetricConfiguration(
-        metric_name="column.max.aggregate_fn",
+        metric_name=f"column.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -741,7 +744,7 @@ def test_sparkdf_batch_aggregate_metrics(caplog, spark_session):
         "table.columns": table_columns_metric,
     }
     desired_aggregate_fn_metric_2 = MetricConfiguration(
-        metric_name="column.min.aggregate_fn",
+        metric_name=f"column.min.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -749,7 +752,7 @@ def test_sparkdf_batch_aggregate_metrics(caplog, spark_session):
         "table.columns": table_columns_metric,
     }
     desired_aggregate_fn_metric_3 = MetricConfiguration(
-        metric_name="column.max.aggregate_fn",
+        metric_name=f"column.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "b"},
         metric_value_kwargs=None,
     )
@@ -757,7 +760,7 @@ def test_sparkdf_batch_aggregate_metrics(caplog, spark_session):
         "table.columns": table_columns_metric,
     }
     desired_aggregate_fn_metric_4 = MetricConfiguration(
-        metric_name="column.min.aggregate_fn",
+        metric_name=f"column.min.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "b"},
         metric_value_kwargs=None,
     )
@@ -1168,7 +1171,7 @@ def test_resolve_metric_bundle_with_compute_domain_kwargs_json_serialization(
     metrics.update(results)
 
     aggregate_fn_metric = MetricConfiguration(
-        metric_name="column_values.length.max.aggregate_fn",
+        metric_name=f"column_values.length.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={
             "column": "names",
             "batch_id": "my_id",
diff --git a/tests/execution_engine/test_sqlalchemy_execution_engine.py b/tests/execution_engine/test_sqlalchemy_execution_engine.py
--- a/tests/execution_engine/test_sqlalchemy_execution_engine.py
+++ b/tests/execution_engine/test_sqlalchemy_execution_engine.py
@@ -12,6 +12,9 @@
 )
 from great_expectations.core.metric_domain_types import MetricDomainTypes
 from great_expectations.data_context.util import file_relative_path
+from great_expectations.execution_engine.execution_engine import (
+    MetricPartialFunctionTypes,
+)
 from great_expectations.execution_engine.sqlalchemy_batch_data import (
     SqlAlchemyBatchData,
 )
@@ -169,7 +172,7 @@ def test_sa_batch_aggregate_metrics(caplog, sa):
     metrics.update(results)
 
     aggregate_fn_metric_1 = MetricConfiguration(
-        metric_name="column.max.aggregate_fn",
+        metric_name=f"column.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -177,7 +180,7 @@ def test_sa_batch_aggregate_metrics(caplog, sa):
         "table.columns": table_columns_metric,
     }
     aggregate_fn_metric_2 = MetricConfiguration(
-        metric_name="column.min.aggregate_fn",
+        metric_name=f"column.min.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -185,7 +188,7 @@ def test_sa_batch_aggregate_metrics(caplog, sa):
         "table.columns": table_columns_metric,
     }
     aggregate_fn_metric_3 = MetricConfiguration(
-        metric_name="column.max.aggregate_fn",
+        metric_name=f"column.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "b"},
         metric_value_kwargs=None,
     )
@@ -193,7 +196,7 @@ def test_sa_batch_aggregate_metrics(caplog, sa):
         "table.columns": table_columns_metric,
     }
     aggregate_fn_metric_4 = MetricConfiguration(
-        metric_name="column.min.aggregate_fn",
+        metric_name=f"column.min.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "b"},
         metric_value_kwargs=None,
     )
@@ -858,7 +861,7 @@ def test_resolve_metric_bundle_with_compute_domain_kwargs_json_serialization(sa)
     metrics.update(results)
 
     aggregate_fn_metric = MetricConfiguration(
-        metric_name="column_values.length.max.aggregate_fn",
+        metric_name=f"column_values.length.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={
             "column": "names",
             "batch_id": "1234",
diff --git a/tests/expectations/metrics/test_core.py b/tests/expectations/metrics/test_core.py
--- a/tests/expectations/metrics/test_core.py
+++ b/tests/expectations/metrics/test_core.py
@@ -13,6 +13,9 @@
     PandasExecutionEngine,
     SparkDFExecutionEngine,
 )
+from great_expectations.execution_engine.execution_engine import (
+    MetricPartialFunctionTypes,
+)
 from great_expectations.execution_engine.sqlalchemy_execution_engine import (
     SqlAlchemyBatchData,
     SqlAlchemyExecutionEngine,
@@ -278,7 +281,7 @@ def test_column_value_lengths_min_metric_sa(sa):
     metrics.update(results)
 
     aggregate_fn_metric = MetricConfiguration(
-        metric_name="column_values.length.min.aggregate_fn",
+        metric_name=f"column_values.length.min.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={
             "column": "names",
         },
@@ -333,7 +336,7 @@ def test_column_value_lengths_min_metric_spark(spark_session):
     metrics.update(results)
 
     aggregate_fn_metric = MetricConfiguration(
-        metric_name="column_values.length.min.aggregate_fn",
+        metric_name=f"column_values.length.min.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={
             "column": "names",
         },
@@ -428,7 +431,7 @@ def test_column_value_lengths_max_metric_sa(sa):
     metrics.update(results)
 
     aggregate_fn_metric = MetricConfiguration(
-        metric_name="column_values.length.max.aggregate_fn",
+        metric_name=f"column_values.length.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={
             "column": "names",
         },
@@ -483,7 +486,7 @@ def test_column_value_lengths_max_metric_spark(spark_session):
     metrics.update(results)
 
     aggregate_fn_metric = MetricConfiguration(
-        metric_name="column_values.length.max.aggregate_fn",
+        metric_name=f"column_values.length.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={
             "column": "names",
         },
@@ -550,7 +553,7 @@ def test_quantiles_metric_sa(sa):
     metrics.update(results)
 
     partial_metric = MetricConfiguration(
-        metric_name="table.row_count.aggregate_fn",
+        metric_name=f"table.row_count.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={},
         metric_value_kwargs=None,
     )
@@ -1028,7 +1031,7 @@ def test_column_partition_metric_sa(sa):
     metrics.update(results)
 
     partial_column_min_metric = MetricConfiguration(
-        metric_name="column.min.aggregate_fn",
+        metric_name=f"column.min.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -1036,7 +1039,7 @@ def test_column_partition_metric_sa(sa):
         "table.columns": table_columns_metric,
     }
     partial_column_max_metric = MetricConfiguration(
-        metric_name="column.max.aggregate_fn",
+        metric_name=f"column.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -1115,7 +1118,7 @@ def test_column_partition_metric_sa(sa):
     metrics.update(results)
 
     partial_column_min_metric = MetricConfiguration(
-        metric_name="column.min.aggregate_fn",
+        metric_name=f"column.min.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "b"},
         metric_value_kwargs=None,
     )
@@ -1123,7 +1126,7 @@ def test_column_partition_metric_sa(sa):
         "table.columns": table_columns_metric,
     }
     partial_column_max_metric = MetricConfiguration(
-        metric_name="column.max.aggregate_fn",
+        metric_name=f"column.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "b"},
         metric_value_kwargs=None,
     )
@@ -1271,7 +1274,7 @@ def test_column_partition_metric_spark(spark_session):
     metrics.update(results)
 
     partial_column_min_metric = MetricConfiguration(
-        metric_name="column.min.aggregate_fn",
+        metric_name=f"column.min.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -1279,7 +1282,7 @@ def test_column_partition_metric_spark(spark_session):
         "table.columns": table_columns_metric,
     }
     partial_column_max_metric = MetricConfiguration(
-        metric_name="column.max.aggregate_fn",
+        metric_name=f"column.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -1358,7 +1361,7 @@ def test_column_partition_metric_spark(spark_session):
     metrics.update(results)
 
     partial_column_min_metric = MetricConfiguration(
-        metric_name="column.min.aggregate_fn",
+        metric_name=f"column.min.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "b"},
         metric_value_kwargs=None,
     )
@@ -1366,7 +1369,7 @@ def test_column_partition_metric_spark(spark_session):
         "table.columns": table_columns_metric,
     }
     partial_column_max_metric = MetricConfiguration(
-        metric_name="column.max.aggregate_fn",
+        metric_name=f"column.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "b"},
         metric_value_kwargs=None,
     )
@@ -1518,7 +1521,7 @@ def test_max_metric_column_exists_sa(sa):
     metrics.update(results)
 
     partial_metric = MetricConfiguration(
-        metric_name="column.max.aggregate_fn",
+        metric_name=f"column.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -1560,7 +1563,7 @@ def test_max_metric_column_does_not_exist_sa(sa):
     metrics.update(results)
 
     partial_metric = MetricConfiguration(
-        metric_name="column.max.aggregate_fn",
+        metric_name=f"column.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "non_existent_column"},
         metric_value_kwargs=None,
     )
@@ -1596,7 +1599,7 @@ def test_max_metric_column_exists_spark(spark_session):
     metrics.update(results)
 
     partial_metric = MetricConfiguration(
-        metric_name="column.max.aggregate_fn",
+        metric_name=f"column.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -1642,7 +1645,7 @@ def test_max_metric_column_does_not_exist_spark(spark_session):
     metrics.update(results)
 
     partial_metric = MetricConfiguration(
-        metric_name="column.max.aggregate_fn",
+        metric_name=f"column.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "non_existent_column"},
         metric_value_kwargs=None,
     )
@@ -1687,7 +1690,7 @@ def test_map_value_set_sa(sa):
 
     # Note: metric_dependencies is optional here in the config when called from a validator.
     aggregate_partial = MetricConfiguration(
-        metric_name="column_values.in_set.unexpected_count.aggregate_fn",
+        metric_name=f"column_values.in_set.unexpected_count.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs={"value_set": [1, 2, 3]},
     )
@@ -1771,7 +1774,7 @@ def test_map_value_set_spark(spark_session, basic_spark_df_execution_engine):
 
     # Note: metric_dependencies is optional here in the config when called from a validator.
     aggregate_partial = MetricConfiguration(
-        metric_name="column_values.in_set.unexpected_count.aggregate_fn",
+        metric_name=f"column_values.in_set.unexpected_count.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={
             "column": "a",
         },
@@ -1827,7 +1830,7 @@ def test_map_value_set_spark(spark_session, basic_spark_df_execution_engine):
 
     # Note: metric_dependencies is optional here in the config when called from a validator.
     aggregate_partial = MetricConfiguration(
-        metric_name="column_values.in_set.unexpected_count.aggregate_fn",
+        metric_name=f"column_values.in_set.unexpected_count.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs={"value_set": [1, 2, 3]},
     )
@@ -2765,7 +2768,7 @@ def test_z_score_under_threshold_spark(spark_session):
     metrics.update(results)
 
     column_mean_aggregate_fn_metric = MetricConfiguration(
-        metric_name="column.mean.aggregate_fn",
+        metric_name=f"column.mean.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -2773,7 +2776,7 @@ def test_z_score_under_threshold_spark(spark_session):
         "table.columns": table_columns_metric,
     }
     column_standard_deviation_aggregate_fn_metric = MetricConfiguration(
-        metric_name="column.standard_deviation.aggregate_fn",
+        metric_name=f"column.standard_deviation.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -2841,7 +2844,7 @@ def test_z_score_under_threshold_spark(spark_session):
     metrics.update(results)
 
     aggregate_fn_metric = MetricConfiguration(
-        metric_name="column_values.z_score.under_threshold.unexpected_count.aggregate_fn",
+        metric_name=f"column_values.z_score.under_threshold.unexpected_count.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs={"double_sided": True, "threshold": 2},
     )
@@ -3102,7 +3105,7 @@ def test_table_metric_sa(sa):
     engine = build_sa_engine(pd.DataFrame({"a": [1, 2, 1, 2, 3, 3]}), sa)
 
     aggregate_fn_metric = MetricConfiguration(
-        metric_name="table.row_count.aggregate_fn",
+        metric_name=f"table.row_count.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={},
         metric_value_kwargs=None,
     )
@@ -4047,7 +4050,7 @@ def test_table_metric_spark(spark_session):
     )
 
     aggregate_fn_metric = MetricConfiguration(
-        metric_name="table.row_count.aggregate_fn",
+        metric_name=f"table.row_count.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={},
         metric_value_kwargs=None,
     )
@@ -4126,7 +4129,7 @@ def test_column_median_metric_sa(sa, dataframe: pd.DataFrame, median: int):
     metrics.update(results)
 
     partial_metric = MetricConfiguration(
-        metric_name="table.row_count.aggregate_fn",
+        metric_name=f"table.row_count.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={},
         metric_value_kwargs=None,
     )
@@ -4204,7 +4207,7 @@ def test_column_median_metric_spark(spark_session):
     )
 
     aggregate_fn_metric = MetricConfiguration(
-        metric_name="table.row_count.aggregate_fn",
+        metric_name=f"table.row_count.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -4379,7 +4382,7 @@ def test_distinct_metric_spark(
     assert metrics[column_distinct_values_metric.id] == {1, 2, 3}
 
     column_distinct_values_count_metric_partial_fn = MetricConfiguration(
-        metric_name="column.distinct_values.count.aggregate_fn",
+        metric_name=f"column.distinct_values.count.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -4467,7 +4470,7 @@ def test_distinct_metric_sa(
     assert metrics[column_distinct_values_metric.id] == {1, 2, 3}
 
     column_distinct_values_count_metric_partial_fn = MetricConfiguration(
-        metric_name="column.distinct_values.count.aggregate_fn",
+        metric_name=f"column.distinct_values.count.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -4696,7 +4699,7 @@ def test_batch_aggregate_metrics_sa(caplog, sa):
     metrics.update(results)
 
     desired_aggregate_fn_metric_1 = MetricConfiguration(
-        metric_name="column.max.aggregate_fn",
+        metric_name=f"column.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -4704,7 +4707,7 @@ def test_batch_aggregate_metrics_sa(caplog, sa):
         "table.columns": table_columns_metric,
     }
     desired_aggregate_fn_metric_2 = MetricConfiguration(
-        metric_name="column.min.aggregate_fn",
+        metric_name=f"column.min.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -4712,7 +4715,7 @@ def test_batch_aggregate_metrics_sa(caplog, sa):
         "table.columns": table_columns_metric,
     }
     desired_aggregate_fn_metric_3 = MetricConfiguration(
-        metric_name="column.max.aggregate_fn",
+        metric_name=f"column.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "b"},
         metric_value_kwargs=None,
     )
@@ -4720,7 +4723,7 @@ def test_batch_aggregate_metrics_sa(caplog, sa):
         "table.columns": table_columns_metric,
     }
     desired_aggregate_fn_metric_4 = MetricConfiguration(
-        metric_name="column.min.aggregate_fn",
+        metric_name=f"column.min.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "b"},
         metric_value_kwargs=None,
     )
@@ -4826,7 +4829,7 @@ def test_batch_aggregate_metrics_spark(caplog, spark_session):
     metrics.update(results)
 
     desired_aggregate_fn_metric_1 = MetricConfiguration(
-        metric_name="column.max.aggregate_fn",
+        metric_name=f"column.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -4834,7 +4837,7 @@ def test_batch_aggregate_metrics_spark(caplog, spark_session):
         "table.columns": table_columns_metric,
     }
     desired_aggregate_fn_metric_2 = MetricConfiguration(
-        metric_name="column.min.aggregate_fn",
+        metric_name=f"column.min.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "a"},
         metric_value_kwargs=None,
     )
@@ -4842,7 +4845,7 @@ def test_batch_aggregate_metrics_spark(caplog, spark_session):
         "table.columns": table_columns_metric,
     }
     desired_aggregate_fn_metric_3 = MetricConfiguration(
-        metric_name="column.max.aggregate_fn",
+        metric_name=f"column.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "b"},
         metric_value_kwargs=None,
     )
@@ -4850,7 +4853,7 @@ def test_batch_aggregate_metrics_spark(caplog, spark_session):
         "table.columns": table_columns_metric,
     }
     desired_aggregate_fn_metric_4 = MetricConfiguration(
-        metric_name="column.min.aggregate_fn",
+        metric_name=f"column.min.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={"column": "b"},
         metric_value_kwargs=None,
     )
diff --git a/tests/expectations/metrics/test_map_metric.py b/tests/expectations/metrics/test_map_metric.py
--- a/tests/expectations/metrics/test_map_metric.py
+++ b/tests/expectations/metrics/test_map_metric.py
@@ -19,6 +19,9 @@
     SparkDFExecutionEngine,
     SqlAlchemyExecutionEngine,
 )
+from great_expectations.execution_engine.execution_engine import (
+    MetricPartialFunctionTypes,
+)
 from great_expectations.expectations.core import ExpectColumnValuesToBeInSet
 from great_expectations.expectations.metrics import (
     ColumnMax,
@@ -280,7 +283,10 @@ def test_get_table_metric_provider_metric_dependencies(empty_sqlite_db):
     dependencies = mp.get_evaluation_dependencies(
         metric, execution_engine=SqlAlchemyExecutionEngine(engine=empty_sqlite_db)
     )
-    assert dependencies["metric_partial_fn"].id[0] == "column.max.aggregate_fn"
+    assert (
+        dependencies["metric_partial_fn"].id[0]
+        == f"column.max.{MetricPartialFunctionTypes.AGGREGATE_FN.value}"
+    )
 
     mp = ColumnMax()
     metric = MetricConfiguration(
@@ -329,11 +335,11 @@ def test_get_aggregate_count_aware_metric_dependencies(basic_spark_df_execution_
     )
     assert (
         dependencies["metric_partial_fn"].id[0]
-        == "column_values.nonnull.unexpected_count.aggregate_fn"
+        == f"column_values.nonnull.unexpected_count.{MetricPartialFunctionTypes.AGGREGATE_FN.value}"
     )
 
     metric = MetricConfiguration(
-        metric_name="column_values.nonnull.unexpected_count.aggregate_fn",
+        metric_name=f"column_values.nonnull.unexpected_count.{MetricPartialFunctionTypes.AGGREGATE_FN.value}",
         metric_domain_kwargs={},
         metric_value_kwargs=None,
     )