prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN 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._
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `opteryx/planner/views/__init__.py`
  Content:
  ```
  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         # DEBUG:: log (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
  ```
  
  Path: `opteryx/__version__.py`
  Content:
  ```
  1 __build__ = 523
  2 
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #     http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 
  15 """
  16 Store the version here so:
  17 1) we don't load dependencies by storing it in __init__.py
  18 2) we can import it in setup.py for the same reason
  19 """
  20 from enum import Enum  # isort: skip
  21 
  22 
  23 class VersionStatus(Enum):
  24     ALPHA = "alpha"
  25     BETA = "beta"
  26     RELEASE = "release"
  27 
  28 
  29 _major = 0
  30 _minor = 16
  31 _revision = 0
  32 _status = VersionStatus.ALPHA
  33 
  34 __author__ = "@joocer"
  35 __version__ = f"{_major}.{_minor}.{_revision}" + (
  36     f"-{_status.value}.{__build__}" if _status != VersionStatus.RELEASE else ""
  37 )
  38
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/opteryx/__version__.py b/opteryx/__version__.py
  --- a/opteryx/__version__.py
  +++ b/opteryx/__version__.py
  @@ -1,4 +1,4 @@
  -__build__ = 523
  +__build__ = 526
   
   # Licensed under the Apache License, Version 2.0 (the "License");
   # you may not use this file except in compliance with the License.
  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/__version__.py b/opteryx/__version__.py\n--- a/opteryx/__version__.py\n+++ b/opteryx/__version__.py\n@@ -1,4 +1,4 @@\n-__build__ = 523\n+__build__ = 526\n \n # Licensed under the Apache License, Version 2.0 (the \"License\");\n # you may not use this file except in compliance with the License.\ndiff --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        # DEBUG:: log (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"}, {"content": "__build__ = 523\n\n# 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\n\"\"\"\nStore the version here so:\n1) we don't load dependencies by storing it in __init__.py\n2) we can import it in setup.py for the same reason\n\"\"\"\nfrom enum import Enum  # isort: skip\n\n\nclass VersionStatus(Enum):\n    ALPHA = \"alpha\"\n    BETA = \"beta\"\n    RELEASE = \"release\"\n\n\n_major = 0\n_minor = 16\n_revision = 0\n_status = VersionStatus.ALPHA\n\n__author__ = \"@joocer\"\n__version__ = f\"{_major}.{_minor}.{_revision}\" + (\n    f\"-{_status.value}.{__build__}\" if _status != VersionStatus.RELEASE else \"\"\n)\n", "path": "opteryx/__version__.py"}], "after_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        # DEBUG:: log (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"}, {"content": "__build__ = 526\n\n# 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\n\"\"\"\nStore the version here so:\n1) we don't load dependencies by storing it in __init__.py\n2) we can import it in setup.py for the same reason\n\"\"\"\nfrom enum import Enum  # isort: skip\n\n\nclass VersionStatus(Enum):\n    ALPHA = \"alpha\"\n    BETA = \"beta\"\n    RELEASE = \"release\"\n\n\n_major = 0\n_minor = 16\n_revision = 0\n_status = VersionStatus.ALPHA\n\n__author__ = \"@joocer\"\n__version__ = f\"{_major}.{_minor}.{_revision}\" + (\n    f\"-{_status.value}.{__build__}\" if _status != VersionStatus.RELEASE else \"\"\n)\n", "path": "opteryx/__version__.py"}]}