prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Use cleaner solution for non-truncating division in python 2
  Prefer `from __future__ import division` to `1.*x/y`
  
  </issue>
  <code>
  [start of great_expectations/expectations/metrics/multicolumn_map_metrics/select_column_values_unique_within_record.py]
  1 import logging
  2 from functools import reduce
  3 
  4 from great_expectations.execution_engine import (
  5     PandasExecutionEngine,
  6     SparkDFExecutionEngine,
  7     SqlAlchemyExecutionEngine,
  8 )
  9 from great_expectations.expectations.metrics.import_manager import F, sa
  10 from great_expectations.expectations.metrics.map_metric_provider import (
  11     MulticolumnMapMetricProvider,
  12     multicolumn_condition_partial,
  13 )
  14 
  15 logger = logging.getLogger(__name__)
  16 
  17 
  18 class SelectColumnValuesUniqueWithinRecord(MulticolumnMapMetricProvider):
  19     condition_metric_name = "select_column_values.unique.within_record"
  20     condition_domain_keys = (
  21         "batch_id",
  22         "table",
  23         "column_list",
  24         "row_condition",
  25         "condition_parser",
  26         "ignore_row_if",
  27     )
  28 
  29     @multicolumn_condition_partial(engine=PandasExecutionEngine)
  30     def _pandas(cls, column_list, **kwargs):
  31         num_columns = len(column_list.columns)
  32         row_wise_cond = column_list.nunique(dropna=False, axis=1) >= num_columns
  33         return row_wise_cond
  34 
  35     @multicolumn_condition_partial(engine=SqlAlchemyExecutionEngine)
  36     def _sqlalchemy(cls, column_list, **kwargs):
  37         """
  38         The present approach relies on an inefficient query condition construction implementation, whose computational
  39         cost is O(num_columns^2).  However, until a more efficient implementation compatible with SQLAlchemy is
  40         available, this is the only feasible mechanism under the current architecture, where map metric providers must
  41         return a condition.  Nevertheless, SQL query length limit is 1GB (sufficient for most practical scenarios).
  42         """
  43         num_columns = len(column_list)
  44 
  45         # An arbitrary "num_columns" value used for issuing an explanatory message as a warning.
  46         if num_columns > 100:
  47             logger.warning(
  48                 f"""Batch data with {num_columns} columns is detected.  Computing the "{cls.condition_metric_name}" \
  49 metric for wide tables using SQLAlchemy leads to long WHERE clauses for the underlying database engine to process.
  50 """
  51             )
  52 
  53         conditions = sa.or_(
  54             *(
  55                 sa.or_(
  56                     column_list[idx_src] == column_list[idx_dest],
  57                     sa.and_(
  58                         column_list[idx_src] == None, column_list[idx_dest] == None
  59                     ),
  60                 )
  61                 for idx_src in range(num_columns - 1)
  62                 for idx_dest in range(idx_src + 1, num_columns)
  63             )
  64         )
  65         row_wise_cond = sa.not_(sa.or_(conditions))
  66         return row_wise_cond
  67 
  68     @multicolumn_condition_partial(engine=SparkDFExecutionEngine)
  69     def _spark(cls, column_list, **kwargs):
  70         column_names = column_list.columns
  71         num_columns = len(column_names)
  72 
  73         conditions = []
  74         for idx_src in range(num_columns - 1):
  75             for idx_dest in range(idx_src + 1, num_columns):
  76                 conditions.append(
  77                     F.col(column_names[idx_src]).eqNullSafe(
  78                         F.col(column_names[idx_dest])
  79                     )
  80                 )
  81 
  82         row_wise_cond = ~reduce(lambda a, b: a | b, conditions)
  83         return row_wise_cond
  84
  [end of great_expectations/expectations/metrics/multicolumn_map_metrics/select_column_values_unique_within_record.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/great_expectations/expectations/metrics/multicolumn_map_metrics/select_column_values_unique_within_record.py b/great_expectations/expectations/metrics/multicolumn_map_metrics/select_column_values_unique_within_record.py
  --- a/great_expectations/expectations/metrics/multicolumn_map_metrics/select_column_values_unique_within_record.py
  +++ b/great_expectations/expectations/metrics/multicolumn_map_metrics/select_column_values_unique_within_record.py
  @@ -62,7 +62,7 @@
                   for idx_dest in range(idx_src + 1, num_columns)
               )
           )
  -        row_wise_cond = sa.not_(sa.or_(conditions))
  +        row_wise_cond = sa.not_(conditions)
           return row_wise_cond
   
       @multicolumn_condition_partial(engine=SparkDFExecutionEngine)
  
verification_info: {"golden_diff": "diff --git a/great_expectations/expectations/metrics/multicolumn_map_metrics/select_column_values_unique_within_record.py b/great_expectations/expectations/metrics/multicolumn_map_metrics/select_column_values_unique_within_record.py\n--- a/great_expectations/expectations/metrics/multicolumn_map_metrics/select_column_values_unique_within_record.py\n+++ b/great_expectations/expectations/metrics/multicolumn_map_metrics/select_column_values_unique_within_record.py\n@@ -62,7 +62,7 @@\n                 for idx_dest in range(idx_src + 1, num_columns)\n             )\n         )\n-        row_wise_cond = sa.not_(sa.or_(conditions))\n+        row_wise_cond = sa.not_(conditions)\n         return row_wise_cond\n \n     @multicolumn_condition_partial(engine=SparkDFExecutionEngine)\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": "import logging\nfrom functools import reduce\n\nfrom great_expectations.execution_engine import (\n    PandasExecutionEngine,\n    SparkDFExecutionEngine,\n    SqlAlchemyExecutionEngine,\n)\nfrom great_expectations.expectations.metrics.import_manager import F, sa\nfrom great_expectations.expectations.metrics.map_metric_provider import (\n    MulticolumnMapMetricProvider,\n    multicolumn_condition_partial,\n)\n\nlogger = logging.getLogger(__name__)\n\n\nclass SelectColumnValuesUniqueWithinRecord(MulticolumnMapMetricProvider):\n    condition_metric_name = \"select_column_values.unique.within_record\"\n    condition_domain_keys = (\n        \"batch_id\",\n        \"table\",\n        \"column_list\",\n        \"row_condition\",\n        \"condition_parser\",\n        \"ignore_row_if\",\n    )\n\n    @multicolumn_condition_partial(engine=PandasExecutionEngine)\n    def _pandas(cls, column_list, **kwargs):\n        num_columns = len(column_list.columns)\n        row_wise_cond = column_list.nunique(dropna=False, axis=1) >= num_columns\n        return row_wise_cond\n\n    @multicolumn_condition_partial(engine=SqlAlchemyExecutionEngine)\n    def _sqlalchemy(cls, column_list, **kwargs):\n        \"\"\"\n        The present approach relies on an inefficient query condition construction implementation, whose computational\n        cost is O(num_columns^2).  However, until a more efficient implementation compatible with SQLAlchemy is\n        available, this is the only feasible mechanism under the current architecture, where map metric providers must\n        return a condition.  Nevertheless, SQL query length limit is 1GB (sufficient for most practical scenarios).\n        \"\"\"\n        num_columns = len(column_list)\n\n        # An arbitrary \"num_columns\" value used for issuing an explanatory message as a warning.\n        if num_columns > 100:\n            logger.warning(\n                f\"\"\"Batch data with {num_columns} columns is detected.  Computing the \"{cls.condition_metric_name}\" \\\nmetric for wide tables using SQLAlchemy leads to long WHERE clauses for the underlying database engine to process.\n\"\"\"\n            )\n\n        conditions = sa.or_(\n            *(\n                sa.or_(\n                    column_list[idx_src] == column_list[idx_dest],\n                    sa.and_(\n                        column_list[idx_src] == None, column_list[idx_dest] == None\n                    ),\n                )\n                for idx_src in range(num_columns - 1)\n                for idx_dest in range(idx_src + 1, num_columns)\n            )\n        )\n        row_wise_cond = sa.not_(sa.or_(conditions))\n        return row_wise_cond\n\n    @multicolumn_condition_partial(engine=SparkDFExecutionEngine)\n    def _spark(cls, column_list, **kwargs):\n        column_names = column_list.columns\n        num_columns = len(column_names)\n\n        conditions = []\n        for idx_src in range(num_columns - 1):\n            for idx_dest in range(idx_src + 1, num_columns):\n                conditions.append(\n                    F.col(column_names[idx_src]).eqNullSafe(\n                        F.col(column_names[idx_dest])\n                    )\n                )\n\n        row_wise_cond = ~reduce(lambda a, b: a | b, conditions)\n        return row_wise_cond\n", "path": "great_expectations/expectations/metrics/multicolumn_map_metrics/select_column_values_unique_within_record.py"}]}