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/query_metrics/query_table.py b/great_expectations/expectations/metrics/query_metrics/query_table.py
--- a/great_expectations/expectations/metrics/query_metrics/query_table.py
+++ b/great_expectations/expectations/metrics/query_metrics/query_table.py
@@ -23,6 +23,7 @@ class QueryTable(QueryMetricProvider):
     metric_name = "query.table"
     value_keys = ("query",)
 
+    # <snippet>
     @metric_value(engine=SqlAlchemyExecutionEngine)
     def _sqlalchemy(
         cls,
@@ -60,6 +61,7 @@ def _sqlalchemy(
         result: List[sqlalchemy_engine_Row] = engine.execute(sa.text(query)).fetchall()
 
         return result
+        # </snippet>
 
     @metric_value(engine=SparkDFExecutionEngine)
     def _spark(


Test patch:
diff --git a/tests/integration/docusaurus/expectations/creating_custom_expectations/expect_queried_column_value_frequency_to_meet_threshold.py b/tests/integration/docusaurus/expectations/creating_custom_expectations/expect_queried_column_value_frequency_to_meet_threshold.py
--- a/tests/integration/docusaurus/expectations/creating_custom_expectations/expect_queried_column_value_frequency_to_meet_threshold.py
+++ b/tests/integration/docusaurus/expectations/creating_custom_expectations/expect_queried_column_value_frequency_to_meet_threshold.py
@@ -192,7 +192,7 @@ def _validate(
                         "row_condition": 'col("col1")==2',
                         "condition_parser": "great_expectations__experimental__",
                     },
-                    "out": {"success": True},
+                    "out": {"success": False},
                     "only_for": ["sqlite", "spark"],
                 },
             ],
diff --git a/tests/integration/test_script_runner.py b/tests/integration/test_script_runner.py
--- a/tests/integration/test_script_runner.py
+++ b/tests/integration/test_script_runner.py
@@ -310,6 +310,16 @@ class IntegrationTestFixture:
         name="expect_column_values_to_only_contain_vowels",
         user_flow_script="tests/integration/docusaurus/expectations/creating_custom_expectations/expect_column_values_to_only_contain_vowels.py",
     ),
+    IntegrationTestFixture(
+        name="expect_queried_column_value_frequency_to_meet_threshold",
+        user_flow_script="tests/integration/docusaurus/expectations/creating_custom_expectations/expect_queried_column_value_frequency_to_meet_threshold.py",
+        extra_backend_dependencies=BackendDependencies.SPARK,
+    ),
+    IntegrationTestFixture(
+        name="expect_queried_table_row_count_to_be",
+        user_flow_script="tests/integration/docusaurus/expectations/creating_custom_expectations/expect_queried_table_row_count_to_be.py",
+        extra_backend_dependencies=BackendDependencies.SPARK,
+    ),
     IntegrationTestFixture(
         name="how_to_use_great_expectations_in_aws_glue",
         user_flow_script="tests/integration/docusaurus/deployment_patterns/aws_glue_deployment_patterns.py",