prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  🪲 VIEWs load error should be in debug mode only
  ### Thank you for taking the time to report a problem with Opteryx.
  _To help us to respond to your request we ask that you try to provide the below detail about the bug._
  
  **Describe the bug** _A clear and specific description of what the bug is. What the error, incorrect or unexpected behaviour was._
  
  
  **Expected behaviour** _A clear and concise description of what you expected to happen._
  
  
  **Sample Code/Statement** _If you can, please submit the SQL statement or Python code snippet, or a representative example using the sample datasets._
  
  ~~~sql
  
  ~~~
  
  **Additional context** _Add any other context about the problem here, for example what you have done to try to diagnose or workaround the problem._
  
  
  </issue>
  <code>
  [start of opteryx/planner/views/__init__.py]
  1 # Licensed under the Apache License, Version 2.0 (the "License");
  2 # you may not use this file except in compliance with the License.
  3 # You may obtain a copy of the License at
  4 #
  5 #     http://www.apache.org/licenses/LICENSE-2.0
  6 #
  7 # Unless required by applicable law or agreed to in writing, software
  8 # distributed under the License is distributed on an "AS IS" BASIS,
  9 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10 # See the License for the specific language governing permissions and
  11 # limitations under the License.
  12 
  13 import orjson
  14 
  15 from opteryx.planner.logical_planner import LogicalPlan
  16 
  17 
  18 def _load_views():
  19     try:
  20         with open("views.json", "rb") as defs:
  21             return orjson.loads(defs.read())
  22     except Exception as err:
  23         print(f"[OPTERYX] Unable to open views definition file. {err}")
  24         return {}
  25 
  26 
  27 VIEWS = _load_views()
  28 
  29 
  30 def is_view(view_name: str) -> bool:
  31     return view_name in VIEWS
  32 
  33 
  34 def view_as_plan(view_name: str) -> LogicalPlan:
  35     from opteryx.planner.logical_planner import do_logical_planning_phase
  36     from opteryx.third_party import sqloxide
  37     from opteryx.utils.sql import clean_statement
  38     from opteryx.utils.sql import remove_comments
  39 
  40     operation = VIEWS.get(view_name)["statement"]
  41 
  42     clean_sql = clean_statement(remove_comments(operation))
  43     parsed_statements = sqloxide.parse_sql(clean_sql, dialect="mysql")
  44     logical_plan, _, _ = next(do_logical_planning_phase(parsed_statements))
  45 
  46     return logical_plan
  47
  [end of opteryx/planner/views/__init__.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/opteryx/planner/views/__init__.py b/opteryx/planner/views/__init__.py
  --- a/opteryx/planner/views/__init__.py
  +++ b/opteryx/planner/views/__init__.py
  @@ -20,7 +20,7 @@
           with open("views.json", "rb") as defs:
               return orjson.loads(defs.read())
       except Exception as err:
  -        print(f"[OPTERYX] Unable to open views definition file. {err}")
  +        # DEBUG:: log (f"[OPTERYX] Unable to open views definition file. {err}")
           return {}
  
verification_info: {"golden_diff": "diff --git a/opteryx/planner/views/__init__.py b/opteryx/planner/views/__init__.py\n--- a/opteryx/planner/views/__init__.py\n+++ b/opteryx/planner/views/__init__.py\n@@ -20,7 +20,7 @@\n         with open(\"views.json\", \"rb\") as defs:\n             return orjson.loads(defs.read())\n     except Exception as err:\n-        print(f\"[OPTERYX] Unable to open views definition file. {err}\")\n+        # DEBUG:: log (f\"[OPTERYX] Unable to open views definition file. {err}\")\n         return {}\n", "issue": "\ud83e\udeb2 VIEWs load error should be in debug mode only\n### Thank you for taking the time to report a problem with Opteryx.\r\n_To help us to respond to your request we ask that you try to provide the below detail about the bug._\r\n\r\n**Describe the bug** _A clear and specific description of what the bug is. What the error, incorrect or unexpected behaviour was._\r\n\r\n\r\n**Expected behaviour** _A clear and concise description of what you expected to happen._\r\n\r\n\r\n**Sample Code/Statement** _If you can, please submit the SQL statement or Python code snippet, or a representative example using the sample datasets._\r\n\r\n~~~sql\r\n\r\n~~~\r\n\r\n**Additional context** _Add any other context about the problem here, for example what you have done to try to diagnose or workaround the problem._\r\n\n", "before_files": [{"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport orjson\n\nfrom opteryx.planner.logical_planner import LogicalPlan\n\n\ndef _load_views():\n    try:\n        with open(\"views.json\", \"rb\") as defs:\n            return orjson.loads(defs.read())\n    except Exception as err:\n        print(f\"[OPTERYX] Unable to open views definition file. {err}\")\n        return {}\n\n\nVIEWS = _load_views()\n\n\ndef is_view(view_name: str) -> bool:\n    return view_name in VIEWS\n\n\ndef view_as_plan(view_name: str) -> LogicalPlan:\n    from opteryx.planner.logical_planner import do_logical_planning_phase\n    from opteryx.third_party import sqloxide\n    from opteryx.utils.sql import clean_statement\n    from opteryx.utils.sql import remove_comments\n\n    operation = VIEWS.get(view_name)[\"statement\"]\n\n    clean_sql = clean_statement(remove_comments(operation))\n    parsed_statements = sqloxide.parse_sql(clean_sql, dialect=\"mysql\")\n    logical_plan, _, _ = next(do_logical_planning_phase(parsed_statements))\n\n    return logical_plan\n", "path": "opteryx/planner/views/__init__.py"}]}