We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Use cleaner solution for non-truncating division in python 2
Prefer `from __future__ import division` to `1.*x/y`

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `great_expectations/expectations/metrics/query_metrics/query_table.py`
Content:
```
1 from typing import Any, Dict, List, Optional, Union
2 
3 from great_expectations.core.metric_domain_types import MetricDomainTypes
4 from great_expectations.execution_engine import (
5     SparkDFExecutionEngine,
6     SqlAlchemyExecutionEngine,
7 )
8 from great_expectations.expectations.metrics.import_manager import (
9     pyspark_sql_DataFrame,
10     pyspark_sql_Row,
11     pyspark_sql_SparkSession,
12     sa,
13     sqlalchemy_engine_Engine,
14     sqlalchemy_engine_Row,
15 )
16 from great_expectations.expectations.metrics.metric_provider import metric_value
17 from great_expectations.expectations.metrics.query_metric_provider import (
18     QueryMetricProvider,
19 )
20 
21 
22 class QueryTable(QueryMetricProvider):
23     metric_name = "query.table"
24     value_keys = ("query",)
25 
26     @metric_value(engine=SqlAlchemyExecutionEngine)
27     def _sqlalchemy(
28         cls,
29         execution_engine: SqlAlchemyExecutionEngine,
30         metric_domain_kwargs: dict,
31         metric_value_kwargs: dict,
32         metrics: Dict[str, Any],
33         runtime_configuration: dict,
34     ) -> List[sqlalchemy_engine_Row]:
35         query: Optional[str] = metric_value_kwargs.get(
36             "query"
37         ) or cls.default_kwarg_values.get("query")
38 
39         selectable: Union[sa.sql.Selectable, str]
40         selectable, _, _ = execution_engine.get_compute_domain(
41             metric_domain_kwargs, domain_type=MetricDomainTypes.TABLE
42         )
43 
44         if isinstance(selectable, sa.Table):
45             query = query.format(active_batch=selectable)
46         elif isinstance(
47             selectable, sa.sql.Subquery
48         ):  # Specifying a runtime query in a RuntimeBatchRequest returns the active bacth as a Subquery; sectioning the active batch off w/ parentheses ensures flow of operations doesn't break
49             query = query.format(active_batch=f"({selectable})")
50         elif isinstance(
51             selectable, sa.sql.Select
52         ):  # Specifying a row_condition returns the active batch as a Select object, requiring compilation & aliasing when formatting the parameterized query
53             query = query.format(
54                 active_batch=f'({selectable.compile(compile_kwargs={"literal_binds": True})}) AS subselect',
55             )
56         else:
57             query = query.format(active_batch=f"({selectable})")
58 
59         engine: sqlalchemy_engine_Engine = execution_engine.engine
60         result: List[sqlalchemy_engine_Row] = engine.execute(sa.text(query)).fetchall()
61 
62         return result
63 
64     @metric_value(engine=SparkDFExecutionEngine)
65     def _spark(
66         cls,
67         execution_engine: SparkDFExecutionEngine,
68         metric_domain_kwargs: dict,
69         metric_value_kwargs: dict,
70         metrics: Dict[str, Any],
71         runtime_configuration: dict,
72     ) -> List[pyspark_sql_Row]:
73         query: Optional[str] = metric_value_kwargs.get(
74             "query"
75         ) or cls.default_kwarg_values.get("query")
76 
77         df: pyspark_sql_DataFrame
78         df, _, _ = execution_engine.get_compute_domain(
79             metric_domain_kwargs, domain_type=MetricDomainTypes.TABLE
80         )
81 
82         df.createOrReplaceTempView("tmp_view")
83         query = query.format(active_batch="tmp_view")
84 
85         engine: pyspark_sql_SparkSession = execution_engine.spark
86         result: List[pyspark_sql_Row] = engine.sql(query).collect()
87 
88         return result
89
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

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 @@
     metric_name = "query.table"
     value_keys = ("query",)
 
+    # <snippet>
     @metric_value(engine=SqlAlchemyExecutionEngine)
     def _sqlalchemy(
         cls,
@@ -60,6 +61,7 @@
         result: List[sqlalchemy_engine_Row] = engine.execute(sa.text(query)).fetchall()
 
         return result
+        # </snippet>
 
     @metric_value(engine=SparkDFExecutionEngine)
     def _spark(

{"golden_diff": "diff --git a/great_expectations/expectations/metrics/query_metrics/query_table.py b/great_expectations/expectations/metrics/query_metrics/query_table.py\n--- a/great_expectations/expectations/metrics/query_metrics/query_table.py\n+++ b/great_expectations/expectations/metrics/query_metrics/query_table.py\n@@ -23,6 +23,7 @@\n     metric_name = \"query.table\"\n     value_keys = (\"query\",)\n \n+    # <snippet>\n     @metric_value(engine=SqlAlchemyExecutionEngine)\n     def _sqlalchemy(\n         cls,\n@@ -60,6 +61,7 @@\n         result: List[sqlalchemy_engine_Row] = engine.execute(sa.text(query)).fetchall()\n \n         return result\n+        # </snippet>\n \n     @metric_value(engine=SparkDFExecutionEngine)\n     def _spark(\n", "issue": "Use cleaner solution for non-truncating division in python 2\nPrefer `from __future__ import division` to `1.*x/y`\n", "before_files": [{"content": "from typing import Any, Dict, List, Optional, Union\n\nfrom great_expectations.core.metric_domain_types import MetricDomainTypes\nfrom great_expectations.execution_engine import (\n    SparkDFExecutionEngine,\n    SqlAlchemyExecutionEngine,\n)\nfrom great_expectations.expectations.metrics.import_manager import (\n    pyspark_sql_DataFrame,\n    pyspark_sql_Row,\n    pyspark_sql_SparkSession,\n    sa,\n    sqlalchemy_engine_Engine,\n    sqlalchemy_engine_Row,\n)\nfrom great_expectations.expectations.metrics.metric_provider import metric_value\nfrom great_expectations.expectations.metrics.query_metric_provider import (\n    QueryMetricProvider,\n)\n\n\nclass QueryTable(QueryMetricProvider):\n    metric_name = \"query.table\"\n    value_keys = (\"query\",)\n\n    @metric_value(engine=SqlAlchemyExecutionEngine)\n    def _sqlalchemy(\n        cls,\n        execution_engine: SqlAlchemyExecutionEngine,\n        metric_domain_kwargs: dict,\n        metric_value_kwargs: dict,\n        metrics: Dict[str, Any],\n        runtime_configuration: dict,\n    ) -> List[sqlalchemy_engine_Row]:\n        query: Optional[str] = metric_value_kwargs.get(\n            \"query\"\n        ) or cls.default_kwarg_values.get(\"query\")\n\n        selectable: Union[sa.sql.Selectable, str]\n        selectable, _, _ = execution_engine.get_compute_domain(\n            metric_domain_kwargs, domain_type=MetricDomainTypes.TABLE\n        )\n\n        if isinstance(selectable, sa.Table):\n            query = query.format(active_batch=selectable)\n        elif isinstance(\n            selectable, sa.sql.Subquery\n        ):  # Specifying a runtime query in a RuntimeBatchRequest returns the active bacth as a Subquery; sectioning the active batch off w/ parentheses ensures flow of operations doesn't break\n            query = query.format(active_batch=f\"({selectable})\")\n        elif isinstance(\n            selectable, sa.sql.Select\n        ):  # Specifying a row_condition returns the active batch as a Select object, requiring compilation & aliasing when formatting the parameterized query\n            query = query.format(\n                active_batch=f'({selectable.compile(compile_kwargs={\"literal_binds\": True})}) AS subselect',\n            )\n        else:\n            query = query.format(active_batch=f\"({selectable})\")\n\n        engine: sqlalchemy_engine_Engine = execution_engine.engine\n        result: List[sqlalchemy_engine_Row] = engine.execute(sa.text(query)).fetchall()\n\n        return result\n\n    @metric_value(engine=SparkDFExecutionEngine)\n    def _spark(\n        cls,\n        execution_engine: SparkDFExecutionEngine,\n        metric_domain_kwargs: dict,\n        metric_value_kwargs: dict,\n        metrics: Dict[str, Any],\n        runtime_configuration: dict,\n    ) -> List[pyspark_sql_Row]:\n        query: Optional[str] = metric_value_kwargs.get(\n            \"query\"\n        ) or cls.default_kwarg_values.get(\"query\")\n\n        df: pyspark_sql_DataFrame\n        df, _, _ = execution_engine.get_compute_domain(\n            metric_domain_kwargs, domain_type=MetricDomainTypes.TABLE\n        )\n\n        df.createOrReplaceTempView(\"tmp_view\")\n        query = query.format(active_batch=\"tmp_view\")\n\n        engine: pyspark_sql_SparkSession = execution_engine.spark\n        result: List[pyspark_sql_Row] = engine.sql(query).collect()\n\n        return result\n", "path": "great_expectations/expectations/metrics/query_metrics/query_table.py"}], "after_files": [{"content": "from typing import Any, Dict, List, Optional, Union\n\nfrom great_expectations.core.metric_domain_types import MetricDomainTypes\nfrom great_expectations.execution_engine import (\n    SparkDFExecutionEngine,\n    SqlAlchemyExecutionEngine,\n)\nfrom great_expectations.expectations.metrics.import_manager import (\n    pyspark_sql_DataFrame,\n    pyspark_sql_Row,\n    pyspark_sql_SparkSession,\n    sa,\n    sqlalchemy_engine_Engine,\n    sqlalchemy_engine_Row,\n)\nfrom great_expectations.expectations.metrics.metric_provider import metric_value\nfrom great_expectations.expectations.metrics.query_metric_provider import (\n    QueryMetricProvider,\n)\n\n\nclass QueryTable(QueryMetricProvider):\n    metric_name = \"query.table\"\n    value_keys = (\"query\",)\n\n    # <snippet>\n    @metric_value(engine=SqlAlchemyExecutionEngine)\n    def _sqlalchemy(\n        cls,\n        execution_engine: SqlAlchemyExecutionEngine,\n        metric_domain_kwargs: dict,\n        metric_value_kwargs: dict,\n        metrics: Dict[str, Any],\n        runtime_configuration: dict,\n    ) -> List[sqlalchemy_engine_Row]:\n        query: Optional[str] = metric_value_kwargs.get(\n            \"query\"\n        ) or cls.default_kwarg_values.get(\"query\")\n\n        selectable: Union[sa.sql.Selectable, str]\n        selectable, _, _ = execution_engine.get_compute_domain(\n            metric_domain_kwargs, domain_type=MetricDomainTypes.TABLE\n        )\n\n        if isinstance(selectable, sa.Table):\n            query = query.format(active_batch=selectable)\n        elif isinstance(\n            selectable, sa.sql.Subquery\n        ):  # Specifying a runtime query in a RuntimeBatchRequest returns the active bacth as a Subquery; sectioning the active batch off w/ parentheses ensures flow of operations doesn't break\n            query = query.format(active_batch=f\"({selectable})\")\n        elif isinstance(\n            selectable, sa.sql.Select\n        ):  # Specifying a row_condition returns the active batch as a Select object, requiring compilation & aliasing when formatting the parameterized query\n            query = query.format(\n                active_batch=f'({selectable.compile(compile_kwargs={\"literal_binds\": True})}) AS subselect',\n            )\n        else:\n            query = query.format(active_batch=f\"({selectable})\")\n\n        engine: sqlalchemy_engine_Engine = execution_engine.engine\n        result: List[sqlalchemy_engine_Row] = engine.execute(sa.text(query)).fetchall()\n\n        return result\n        # </snippet>\n\n    @metric_value(engine=SparkDFExecutionEngine)\n    def _spark(\n        cls,\n        execution_engine: SparkDFExecutionEngine,\n        metric_domain_kwargs: dict,\n        metric_value_kwargs: dict,\n        metrics: Dict[str, Any],\n        runtime_configuration: dict,\n    ) -> List[pyspark_sql_Row]:\n        query: Optional[str] = metric_value_kwargs.get(\n            \"query\"\n        ) or cls.default_kwarg_values.get(\"query\")\n\n        df: pyspark_sql_DataFrame\n        df, _, _ = execution_engine.get_compute_domain(\n            metric_domain_kwargs, domain_type=MetricDomainTypes.TABLE\n        )\n\n        df.createOrReplaceTempView(\"tmp_view\")\n        query = query.format(active_batch=\"tmp_view\")\n\n        engine: pyspark_sql_SparkSession = execution_engine.spark\n        result: List[pyspark_sql_Row] = engine.sql(query).collect()\n\n        return result\n", "path": "great_expectations/expectations/metrics/query_metrics/query_table.py"}]}