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/expectations/metrics/column_pair_map_metrics/column_pair_values_greater.py b/great_expectations/expectations/metrics/column_pair_map_metrics/column_pair_values_greater.py
--- a/great_expectations/expectations/metrics/column_pair_map_metrics/column_pair_values_greater.py
+++ b/great_expectations/expectations/metrics/column_pair_map_metrics/column_pair_values_greater.py
@@ -1,6 +1,10 @@
 from dateutil.parser import parse
 
-from great_expectations.execution_engine import PandasExecutionEngine
+from great_expectations.execution_engine import (
+    PandasExecutionEngine,
+    SqlAlchemyExecutionEngine,
+)
+from great_expectations.expectations.metrics.import_manager import sa
 from great_expectations.expectations.metrics.map_metric_provider import (
     ColumnPairMapMetricProvider,
     column_pair_condition_partial,
@@ -9,15 +13,22 @@
 
 class ColumnPairValuesAGreaterThanB(ColumnPairMapMetricProvider):
     condition_metric_name = "column_pair_values.a_greater_than_b"
-    condition_value_keys = (
+    condition_domain_keys = (
+        "batch_id",
+        "table",
+        "column_A",
+        "column_B",
+        "row_condition",
+        "condition_parser",
         "ignore_row_if",
+    )
+    condition_value_keys = (
         "or_equal",
         "parse_strings_as_datetimes",
         "allow_cross_type_comparisons",
     )
-    condition_domain_keys = ("batch_id", "table", "column_A", "column_B")
 
-    # TODO: <Alex>ALEX -- temporarily only a Pandas implementation is provided (others to follow).</Alex>
+    # TODO: <Alex>ALEX -- temporarily only Pandas and SQL Alchemy implementations are provided (Spark to follow).</Alex>
     # noinspection PyPep8Naming
     @column_pair_condition_partial(engine=PandasExecutionEngine)
     def _pandas(cls, column_A, column_B, **kwargs):
@@ -40,3 +51,20 @@ def _pandas(cls, column_A, column_B, **kwargs):
             return temp_column_A >= temp_column_B
         else:
             return temp_column_A > temp_column_B
+
+    # noinspection PyPep8Naming
+    @column_pair_condition_partial(engine=SqlAlchemyExecutionEngine)
+    def _sqlalchemy(cls, column_A, column_B, **kwargs):
+        allow_cross_type_comparisons = kwargs.get("allow_cross_type_comparisons")
+        if allow_cross_type_comparisons:
+            raise NotImplementedError
+
+        parse_strings_as_datetimes = kwargs.get("parse_strings_as_datetimes")
+        if parse_strings_as_datetimes:
+            raise NotImplementedError
+
+        or_equal = kwargs.get("or_equal")
+        if or_equal:
+            return sa.case((column_A >= column_B, True), else_=False)
+        else:
+            return sa.case((column_A > column_B, True), else_=False)
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
@@ -1631,6 +1631,7 @@ def _sqlalchemy_map_condition_unexpected_count_aggregate_fn(
     unexpected_condition, compute_domain_kwargs, accessor_domain_kwargs = metrics.get(
         "unexpected_condition"
     )
+
     return (
         sa.func.sum(
             sa.case(
@@ -1657,8 +1658,13 @@ def _sqlalchemy_map_condition_unexpected_count_value(
     unexpected_condition, compute_domain_kwargs, accessor_domain_kwargs = metrics.get(
         "unexpected_condition"
     )
+    """
+    In order to invoke the "ignore_row_if" filtering logic, "execution_engine.get_domain_records()" must be supplied
+    with all of the available "domain_kwargs" keys.
+    """
+    domain_kwargs = dict(**compute_domain_kwargs, **accessor_domain_kwargs)
     selectable = execution_engine.get_domain_records(
-        domain_kwargs=compute_domain_kwargs,
+        domain_kwargs=domain_kwargs,
     )
 
     count_case_statement: List[sa.sql.elements.Label] = [
@@ -1787,8 +1793,13 @@ def _sqlalchemy_column_pair_map_condition_values(
         compute_domain_kwargs,
         accessor_domain_kwargs,
     ) = metrics["unexpected_condition"]
+    """
+    In order to invoke the "ignore_row_if" filtering logic, "execution_engine.get_domain_records()" must be supplied
+    with all of the available "domain_kwargs" keys.
+    """
+    domain_kwargs = dict(**compute_domain_kwargs, **accessor_domain_kwargs)
     selectable = execution_engine.get_domain_records(
-        domain_kwargs=compute_domain_kwargs,
+        domain_kwargs=domain_kwargs,
     )
 
     # noinspection PyPep8Naming
@@ -1817,10 +1828,11 @@ def _sqlalchemy_column_pair_map_condition_values(
     if result_format["result_format"] != "COMPLETE":
         query = query.limit(result_format["partial_unexpected_count"])
 
-    return [
+    unexpected_list = [
         (val.unexpected_values_A, val.unexpected_values_B)
         for val in execution_engine.engine.execute(query).fetchall()
     ]
+    return unexpected_list
 
 
 def _sqlalchemy_column_pair_map_condition_filtered_row_count(
@@ -1869,9 +1881,13 @@ def _sqlalchemy_multicolumn_map_condition_values(
         compute_domain_kwargs,
         accessor_domain_kwargs,
     ) = metrics["unexpected_condition"]
-
+    """
+    In order to invoke the "ignore_row_if" filtering logic, "execution_engine.get_domain_records()" must be supplied
+    with all of the available "domain_kwargs" keys.
+    """
+    domain_kwargs = dict(**compute_domain_kwargs, **accessor_domain_kwargs)
     selectable = execution_engine.get_domain_records(
-        domain_kwargs=compute_domain_kwargs,
+        domain_kwargs=domain_kwargs,
     )
 
     if "column_list" not in accessor_domain_kwargs:
@@ -2338,24 +2354,36 @@ def _register_metric_functions(cls):
                         metric_fn_type=MetricFunctionTypes.VALUE,
                     )
                     if metric_fn_type == MetricPartialFunctionTypes.MAP_CONDITION_FN:
-                        register_metric(
-                            metric_name=metric_name + ".unexpected_count.aggregate_fn",
-                            metric_domain_keys=metric_domain_keys,
-                            metric_value_keys=metric_value_keys,
-                            execution_engine=engine,
-                            metric_class=cls,
-                            metric_provider=_sqlalchemy_map_condition_unexpected_count_aggregate_fn,
-                            metric_fn_type=MetricPartialFunctionTypes.AGGREGATE_FN,
-                        )
-                        register_metric(
-                            metric_name=metric_name + ".unexpected_count",
-                            metric_domain_keys=metric_domain_keys,
-                            metric_value_keys=metric_value_keys,
-                            execution_engine=engine,
-                            metric_class=cls,
-                            metric_provider=None,
-                            metric_fn_type=MetricFunctionTypes.VALUE,
-                        )
+                        if domain_type == MetricDomainTypes.COLUMN:
+                            register_metric(
+                                metric_name=metric_name
+                                + ".unexpected_count.aggregate_fn",
+                                metric_domain_keys=metric_domain_keys,
+                                metric_value_keys=metric_value_keys,
+                                execution_engine=engine,
+                                metric_class=cls,
+                                metric_provider=_sqlalchemy_map_condition_unexpected_count_aggregate_fn,
+                                metric_fn_type=MetricPartialFunctionTypes.AGGREGATE_FN,
+                            )
+                            register_metric(
+                                metric_name=metric_name + ".unexpected_count",
+                                metric_domain_keys=metric_domain_keys,
+                                metric_value_keys=metric_value_keys,
+                                execution_engine=engine,
+                                metric_class=cls,
+                                metric_provider=None,
+                                metric_fn_type=MetricFunctionTypes.VALUE,
+                            )
+                        else:
+                            register_metric(
+                                metric_name=metric_name + ".unexpected_count",
+                                metric_domain_keys=metric_domain_keys,
+                                metric_value_keys=metric_value_keys,
+                                execution_engine=engine,
+                                metric_class=cls,
+                                metric_provider=_sqlalchemy_map_condition_unexpected_count_value,
+                                metric_fn_type=MetricFunctionTypes.VALUE,
+                            )
                     elif (
                         metric_fn_type == MetricPartialFunctionTypes.WINDOW_CONDITION_FN
                     ):
diff --git a/great_expectations/self_check/util.py b/great_expectations/self_check/util.py
--- a/great_expectations/self_check/util.py
+++ b/great_expectations/self_check/util.py
@@ -1239,6 +1239,14 @@ def candidate_test_is_on_temporary_notimplemented_list_cfe(context, expectation_
             "expect_column_values_to_be_json_parseable",
             "expect_column_values_to_match_json_schema",
             "expect_column_stdev_to_be_between",
+            # "expect_column_unique_value_count_to_be_between",
+            # "expect_column_proportion_of_unique_values_to_be_between",
+            # "expect_column_most_common_value_to_be_in_set",
+            # "expect_column_max_to_be_between",
+            # "expect_column_min_to_be_between",
+            # "expect_column_sum_to_be_between",
+            # "expect_column_pair_values_A_to_be_greater_than_B",
+            # "expect_column_pair_values_to_be_equal",
             "expect_column_pair_values_A_to_be_greater_than_B",
             "expect_column_pair_values_to_be_equal",
             "expect_column_pair_values_to_be_in_set",
@@ -1319,8 +1327,26 @@ def candidate_test_is_on_temporary_notimplemented_list_cfe(context, expectation_
             "expect_column_values_to_not_match_like_pattern",
             "expect_column_values_to_match_like_pattern_list",
             "expect_column_values_to_not_match_like_pattern_list",
-            "expect_column_pair_values_A_to_be_greater_than_B",
-            "expect_column_pair_values_to_be_in_set",
+            # "expect_column_values_to_match_strftime_format",
+            # "expect_column_values_to_be_dateutil_parseable",
+            # "expect_column_values_to_be_json_parseable",
+            # "expect_column_values_to_match_json_schema",
+            # "expect_column_distinct_values_to_be_in_set",
+            # "expect_column_distinct_values_to_contain_set",
+            # "expect_column_distinct_values_to_equal_set",
+            # "expect_column_mean_to_be_between",
+            # "expect_column_median_to_be_between",
+            # "expect_column_quantile_values_to_be_between",
+            # "expect_column_stdev_to_be_between",
+            # "expect_column_unique_value_count_to_be_between",
+            # "expect_column_proportion_of_unique_values_to_be_between",
+            # "expect_column_most_common_value_to_be_in_set",
+            # "expect_column_max_to_be_between",
+            # "expect_column_min_to_be_between",
+            # "expect_column_sum_to_be_between",
+            # "expect_column_pair_values_A_to_be_greater_than_B",
+            # "expect_column_pair_values_to_be_equal",
+            # "expect_column_pair_values_to_be_in_set",
             "expect_multicolumn_values_to_be_unique",
             "expect_column_pair_cramers_phi_value_to_be_less_than",
             "expect_column_bootstrapped_ks_test_p_value_to_be_greater_than",


Test patch:
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
@@ -1344,7 +1344,6 @@ def test_map_column_pairs_equal_metric_sa(sa):
     metric_name: str = "column_pair_values.equal"
     condition_metric_name: str = f"{metric_name}.condition"
     unexpected_count_metric_name: str = f"{metric_name}.unexpected_count"
-    partial_metric_name: str = f"{unexpected_count_metric_name}.aggregate_fn"
     unexpected_rows_metric_name: str = f"{metric_name}.unexpected_rows"
     unexpected_values_metric_name: str = f"{metric_name}.unexpected_values"
 
@@ -1367,24 +1366,6 @@ def test_map_column_pairs_equal_metric_sa(sa):
     )
     metrics.update(results)
 
-    partial_metric = MetricConfiguration(
-        metric_name=partial_metric_name,
-        metric_domain_kwargs={
-            "column_A": "b",
-            "column_B": "c",
-        },
-        metric_value_kwargs=None,
-        metric_dependencies={
-            "unexpected_condition": condition_metric,
-            "table.columns": table_columns_metric,
-        },
-    )
-
-    results = engine.resolve_metrics(
-        metrics_to_resolve=(partial_metric,), metrics=metrics
-    )
-    metrics.update(results)
-
     unexpected_count_metric = MetricConfiguration(
         metric_name=unexpected_count_metric_name,
         metric_domain_kwargs={
@@ -1394,7 +1375,6 @@ def test_map_column_pairs_equal_metric_sa(sa):
         metric_value_kwargs=None,
         metric_dependencies={
             "unexpected_condition": condition_metric,
-            "metric_partial_fn": partial_metric,
             "table.columns": table_columns_metric,
         },
     )
@@ -1472,24 +1452,6 @@ def test_map_column_pairs_equal_metric_sa(sa):
     )
     metrics.update(results)
 
-    partial_metric = MetricConfiguration(
-        metric_name=partial_metric_name,
-        metric_domain_kwargs={
-            "column_A": "a",
-            "column_B": "d",
-        },
-        metric_value_kwargs=None,
-        metric_dependencies={
-            "unexpected_condition": condition_metric,
-            "table.columns": table_columns_metric,
-        },
-    )
-
-    results = engine.resolve_metrics(
-        metrics_to_resolve=(partial_metric,), metrics=metrics
-    )
-    metrics.update(results)
-
     unexpected_count_metric = MetricConfiguration(
         metric_name=unexpected_count_metric_name,
         metric_domain_kwargs={
@@ -1499,7 +1461,6 @@ def test_map_column_pairs_equal_metric_sa(sa):
         metric_value_kwargs=None,
         metric_dependencies={
             "unexpected_condition": condition_metric,
-            "metric_partial_fn": partial_metric,
             "table.columns": table_columns_metric,
         },
     )
@@ -1581,6 +1542,10 @@ def test_map_column_pairs_greater_metric_pd():
         },
         metric_value_kwargs={
             "or_equal": True,
+            "result_format": {
+                "result_format": "SUMMARY",
+                "partial_unexpected_count": 6,
+            },
         },
         metric_dependencies={
             "table.columns": table_columns_metric,
@@ -1598,6 +1563,106 @@ def test_map_column_pairs_greater_metric_pd():
         .equals(pd.Series([False, False, False, False]))
     )
 
+    unexpected_values_metric = MetricConfiguration(
+        metric_name="column_pair_values.a_greater_than_b.unexpected_values",
+        metric_domain_kwargs={
+            "column_A": "a",
+            "column_B": "b",
+            "ignore_row_if": "either_value_is_missing",
+        },
+        metric_value_kwargs={
+            "or_equal": True,
+            "result_format": {
+                "result_format": "SUMMARY",
+                "partial_unexpected_count": 6,
+            },
+        },
+        metric_dependencies={
+            "unexpected_condition": condition_metric,
+            "table.columns": table_columns_metric,
+        },
+    )
+    results = engine.resolve_metrics(
+        metrics_to_resolve=(unexpected_values_metric,), metrics=metrics
+    )
+    metrics.update(results)
+
+    assert len(metrics[unexpected_values_metric.id]) == 0
+    assert metrics[unexpected_values_metric.id] == []
+
+
+def test_map_column_pairs_greater_metric_sa(sa):
+    engine = build_sa_engine(
+        pd.DataFrame(
+            data={
+                "a": [2, 3, 4, None, 3, None],
+                "b": [1, 2, 3, None, 3, 5],
+            }
+        ),
+        sa,
+    )
+
+    metrics: dict = {}
+
+    table_columns_metric: MetricConfiguration
+    results: dict
+
+    table_columns_metric, results = get_table_columns_metric(engine=engine)
+    metrics.update(results)
+
+    condition_metric = MetricConfiguration(
+        metric_name="column_pair_values.a_greater_than_b.condition",
+        metric_domain_kwargs={
+            "column_A": "a",
+            "column_B": "b",
+            "ignore_row_if": "either_value_is_missing",
+        },
+        metric_value_kwargs={
+            "or_equal": True,
+            "result_format": {
+                "result_format": "SUMMARY",
+                "partial_unexpected_count": 6,
+            },
+        },
+        metric_dependencies={
+            "table.columns": table_columns_metric,
+        },
+    )
+    results = engine.resolve_metrics(
+        metrics_to_resolve=(condition_metric,),
+        metrics=metrics,
+    )
+    metrics.update(results)
+
+    assert isinstance(metrics[condition_metric.id][0], sa.sql.elements.AsBoolean)
+
+    unexpected_values_metric = MetricConfiguration(
+        metric_name="column_pair_values.a_greater_than_b.unexpected_values",
+        metric_domain_kwargs={
+            "column_A": "a",
+            "column_B": "b",
+            "ignore_row_if": "either_value_is_missing",
+        },
+        metric_value_kwargs={
+            "or_equal": True,
+            "result_format": {
+                "result_format": "SUMMARY",
+                "partial_unexpected_count": 6,
+            },
+        },
+        metric_dependencies={
+            "unexpected_condition": condition_metric,
+            "table.columns": table_columns_metric,
+        },
+    )
+    results = engine.resolve_metrics(
+        metrics_to_resolve=(unexpected_values_metric,), metrics=metrics
+    )
+    metrics.update(results)
+
+    assert len(metrics[unexpected_values_metric.id]) == 0
+    assert metrics[unexpected_values_metric.id] == []
+
 
 def test_map_column_pairs_in_set_metric_pd():
     df = pd.DataFrame({"a": [10, 3, 4, None, 3, None], "b": [1, 2, 3, None, 3, 5]})
@@ -2292,7 +2357,6 @@ def test_map_multicolumn_sum_equal_sa(sa):
     metric_name: str = "multicolumn_sum.equal"
     condition_metric_name: str = f"{metric_name}.condition"
     unexpected_count_metric_name: str = f"{metric_name}.unexpected_count"
-    partial_metric_name: str = f"{unexpected_count_metric_name}.aggregate_fn"
     unexpected_rows_metric_name: str = f"{metric_name}.unexpected_rows"
     unexpected_values_metric_name: str = f"{metric_name}.unexpected_values"
 
@@ -2315,25 +2379,6 @@ def test_map_multicolumn_sum_equal_sa(sa):
     )
     metrics.update(results)
 
-    partial_metric = MetricConfiguration(
-        metric_name=partial_metric_name,
-        metric_domain_kwargs={
-            "column_list": ["a", "b"],
-        },
-        metric_value_kwargs={
-            "sum_total": 5,
-        },
-        metric_dependencies={
-            "unexpected_condition": condition_metric,
-            "table.columns": table_columns_metric,
-        },
-    )
-
-    results = engine.resolve_metrics(
-        metrics_to_resolve=(partial_metric,), metrics=metrics
-    )
-    metrics.update(results)
-
     unexpected_count_metric = MetricConfiguration(
         metric_name=unexpected_count_metric_name,
         metric_domain_kwargs={
@@ -2342,7 +2387,6 @@ def test_map_multicolumn_sum_equal_sa(sa):
         metric_value_kwargs=None,
         metric_dependencies={
             "unexpected_condition": condition_metric,
-            "metric_partial_fn": partial_metric,
             "table.columns": table_columns_metric,
         },
     )
@@ -2419,25 +2463,6 @@ def test_map_multicolumn_sum_equal_sa(sa):
     )
     metrics.update(results)
 
-    partial_metric = MetricConfiguration(
-        metric_name=partial_metric_name,
-        metric_domain_kwargs={
-            "column_list": ["a", "b"],
-        },
-        metric_value_kwargs={
-            "sum_total": 5,
-        },
-        metric_dependencies={
-            "unexpected_condition": condition_metric,
-            "table.columns": table_columns_metric,
-        },
-    )
-
-    results = engine.resolve_metrics(
-        metrics_to_resolve=(partial_metric,), metrics=metrics
-    )
-    metrics.update(results)
-
     unexpected_count_metric = MetricConfiguration(
         metric_name=unexpected_count_metric_name,
         metric_domain_kwargs={
@@ -2446,7 +2471,6 @@ def test_map_multicolumn_sum_equal_sa(sa):
         metric_value_kwargs=None,
         metric_dependencies={
             "unexpected_condition": condition_metric,
-            "metric_partial_fn": partial_metric,
             "table.columns": table_columns_metric,
         },
     )
diff --git a/tests/test_definitions/column_pair_map_expectations/expect_column_pair_values_A_to_be_greater_than_B.json b/tests/test_definitions/column_pair_map_expectations/expect_column_pair_values_A_to_be_greater_than_B.json
--- a/tests/test_definitions/column_pair_map_expectations/expect_column_pair_values_A_to_be_greater_than_B.json
+++ b/tests/test_definitions/column_pair_map_expectations/expect_column_pair_values_A_to_be_greater_than_B.json
@@ -7,7 +7,8 @@
       "y" : [1, 2, 3, 4, 5, 6, 7, 8, 9, null],
       "z" : [1, 2, 3, 4, 5, null, null, null, null, null],
       "a" : ["1/1/2016", "2/2/2016", "3/3/2016", "4/4/2016", "5/5/2016", null, null, null, null, null],
-      "b" : ["1/1/2016", "2/1/2016", "3/1/2016", "4/1/2016", "5/1/2020", null, null, null, null, null]
+      "b" : ["1/1/2016", "2/1/2016", "3/1/2016", "4/1/2016", "5/1/2020", null, null, null, null, null],
+      "c" : [1, 2, 3, 6, 7, 6, 7, 8, 9, 10]
     },
     "schemas": {
       "spark": {
@@ -16,7 +17,8 @@
         "y": "IntegerType",
         "z": "IntegerType",
         "a": "StringType",
-        "b": "StringType"
+        "b": "StringType",
+        "c": "IntegerType"
       }
     },
     "tests" : [{
@@ -80,6 +82,7 @@
     },{
       "title" : "test_parse_strings_as_datetimes_and_mostly",
       "exact_match_out" : false,
+      "only_for": ["pandas"],
       "in": {
         "column_A": "a",
         "column_B": "b",
@@ -91,6 +94,19 @@
         "unexpected_index_list": [0,4],
         "success": true
       }
+    },{
+      "title" : "test_mostly",
+      "exact_match_out" : false,
+      "in": {
+        "column_A": "x",
+        "column_B": "c",
+        "mostly": 0.8
+      },
+      "out" : {
+        "unexpected_list": [[5, 6], [6, 7]],
+        "unexpected_index_list": [3,4],
+        "success": true
+      }
     }]
   }]
 }
diff --git a/tests/test_definitions/column_pair_map_expectations/expect_column_pair_values_to_be_equal.json b/tests/test_definitions/column_pair_map_expectations/expect_column_pair_values_to_be_equal.json
--- a/tests/test_definitions/column_pair_map_expectations/expect_column_pair_values_to_be_equal.json
+++ b/tests/test_definitions/column_pair_map_expectations/expect_column_pair_values_to_be_equal.json
@@ -5,14 +5,18 @@
       "w" : [1, 2, 3, 4, 5, 6, 7, 8, 9, null],
       "x" : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
       "y" : [1, 2, 3, 4, 5, 6, 7, 8, 9, "abc"],
-      "z" : [1, 2, 3, 4, 5, null, null, null, null, null]
+      "z" : [1, 2, 3, 4, 5, null, null, null, null, null],
+      "a" : [1, 2, 3, 4, 5, 6, 7, 8, 9, 11],
+      "b" : [1, 2, 3, 4, 5, null, null, null, null, null]
     },
     "schemas": {
       "spark": {
         "w": "IntegerType",
         "x": "IntegerType",
         "y": "StringType",
-        "z": "IntegerType"
+        "z": "IntegerType",
+        "a": "IntegerType",
+        "b": "IntegerType"
       }
     },
     "tests" : [{
@@ -28,8 +32,9 @@
         "success": true
       }
     },{
-      "title" : "basic_negative_example",
+      "title" : "basic_negative_example_compare_number_to_text",
       "exact_match_out" : false,
+      "only_for": ["pandas"],
       "in": {
         "column_A": "x",
         "column_B": "y"
@@ -40,9 +45,23 @@
         ],
         "success": false
       }
-    }, {
-      "title" : "positive_example_with_mostly",
+    },{
+      "title" : "basic_negative_example_compare_numbers",
       "exact_match_out" : false,
+      "in": {
+        "column_A": "a",
+        "column_B": "x"
+      },
+      "out" : {
+        "unexpected_list": [
+          [11, 10]
+        ],
+        "success": false
+      }
+    },{
+      "title" : "positive_example_with_mostly_compare_number_to_text",
+      "exact_match_out" : false,
+      "only_for": ["pandas"],
       "in": {
         "column_A": "x",
         "column_B": "y",
@@ -54,9 +73,24 @@
         ],
         "success": true
       }
-    }, {
-      "title" : "positive_example_with_mismatched_null_values_and_ignore_row_if__either_value_is_missing",
+    },{
+      "title" : "positive_example_with_mostly_compare_numbers",
       "exact_match_out" : false,
+      "in": {
+        "column_A": "a",
+        "column_B": "x",
+        "mostly": 0.9
+      },
+      "out" : {
+        "unexpected_list": [
+          [11, 10]
+        ],
+        "success": true
+      }
+    },{
+      "title" : "positive_example_with_mismatched_null_values_and_ignore_row_if__either_value_is_missing_compare_number_to_text",
+      "exact_match_out" : false,
+      "only_for": ["pandas"],
       "in": {
         "column_A": "y",
         "column_B": "z",
@@ -66,6 +100,18 @@
         "unexpected_list": [],
         "success": true
       }
+    },{
+      "title" : "positive_example_with_mismatched_null_values_and_ignore_row_if__either_value_is_missing_compare_numbers",
+      "exact_match_out" : false,
+      "in": {
+        "column_A": "a",
+        "column_B": "b",
+        "ignore_row_if": "either_value_is_missing"
+      },
+      "out" : {
+        "unexpected_list": [],
+        "success": true
+      }
     }, {
       "title" : "a_negative_example_with_mismatched_null_values_and_ignore_row_if__both_values_are_missing_set_explicitly",
       "exact_match_out" : false,