prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  link to documentation on http://ibis-project.org/ is broken
  Everything under /docs/ (including the tutorial) 404's as of 2020-12-02.
  
  </issue>
  <code>
  [start of ibis/backends/impala/__init__.py]
  1 """Impala backend"""
  2 import ibis.common.exceptions as com
  3 import ibis.config
  4 from ibis.config import options
  5 
  6 # these objects are exposed in the public API and are not used in the module
  7 from .client import (  # noqa: F401
  8     ImpalaClient,
  9     ImpalaConnection,
  10     ImpalaDatabase,
  11     ImpalaTable,
  12 )
  13 from .compiler import dialect  # noqa: F401
  14 from .hdfs import HDFS, WebHDFS, hdfs_connect  # noqa: F401
  15 from .udf import *  # noqa: F401,F403
  16 
  17 with ibis.config.config_prefix('impala'):
  18     ibis.config.register_option(
  19         'temp_db',
  20         '__ibis_tmp',
  21         'Database to use for temporary tables, views. functions, etc.',
  22     )
  23     ibis.config.register_option(
  24         'temp_hdfs_path',
  25         '/tmp/ibis',
  26         'HDFS path for storage of temporary data',
  27     )
  28 
  29 
  30 def compile(expr, params=None):
  31     """Force compilation of expression.
  32 
  33     Returns
  34     -------
  35     str
  36 
  37     """
  38     from .compiler import to_sql
  39 
  40     return to_sql(expr, dialect.make_context(params=params))
  41 
  42 
  43 def verify(expr, params=None):
  44     """
  45     Determine if expression can be successfully translated to execute on Impala
  46     """
  47     try:
  48         compile(expr, params=params)
  49         return True
  50     except com.TranslationError:
  51         return False
  52 
  53 
  54 def connect(
  55     host='localhost',
  56     port=21050,
  57     database='default',
  58     timeout=45,
  59     use_ssl=False,
  60     ca_cert=None,
  61     user=None,
  62     password=None,
  63     auth_mechanism='NOSASL',
  64     kerberos_service_name='impala',
  65     pool_size=8,
  66     hdfs_client=None,
  67 ):
  68     """Create an ImpalaClient for use with Ibis.
  69 
  70     Parameters
  71     ----------
  72     host : str, optional
  73         Host name of the impalad or HiveServer2 in Hive
  74     port : int, optional
  75         Impala's HiveServer2 port
  76     database : str, optional
  77         Default database when obtaining new cursors
  78     timeout : int, optional
  79         Connection timeout in seconds when communicating with HiveServer2
  80     use_ssl : bool, optional
  81         Use SSL when connecting to HiveServer2
  82     ca_cert : str, optional
  83         Local path to 3rd party CA certificate or copy of server certificate
  84         for self-signed certificates. If SSL is enabled, but this argument is
  85         ``None``, then certificate validation is skipped.
  86     user : str, optional
  87         LDAP user to authenticate
  88     password : str, optional
  89         LDAP password to authenticate
  90     auth_mechanism : str, optional
  91         {'NOSASL' <- default, 'PLAIN', 'GSSAPI', 'LDAP'}.
  92         Use NOSASL for non-secured Impala connections.  Use PLAIN for
  93         non-secured Hive clusters.  Use LDAP for LDAP authenticated
  94         connections.  Use GSSAPI for Kerberos-secured clusters.
  95     kerberos_service_name : str, optional
  96         Specify particular impalad service principal.
  97 
  98     Examples
  99     --------
  100     >>> import ibis
  101     >>> import os
  102     >>> hdfs_host = os.environ.get('IBIS_TEST_NN_HOST', 'localhost')
  103     >>> hdfs_port = int(os.environ.get('IBIS_TEST_NN_PORT', 50070))
  104     >>> impala_host = os.environ.get('IBIS_TEST_IMPALA_HOST', 'localhost')
  105     >>> impala_port = int(os.environ.get('IBIS_TEST_IMPALA_PORT', 21050))
  106     >>> hdfs = ibis.hdfs_connect(host=hdfs_host, port=hdfs_port)
  107     >>> hdfs  # doctest: +ELLIPSIS
  108     <ibis.filesystems.WebHDFS object at 0x...>
  109     >>> client = ibis.impala.connect(
  110     ...     host=impala_host,
  111     ...     port=impala_port,
  112     ...     hdfs_client=hdfs,
  113     ... )
  114     >>> client  # doctest: +ELLIPSIS
  115     <ibis.impala.client.ImpalaClient object at 0x...>
  116 
  117     Returns
  118     -------
  119     ImpalaClient
  120     """
  121     params = {
  122         'host': host,
  123         'port': port,
  124         'database': database,
  125         'timeout': timeout,
  126         'use_ssl': use_ssl,
  127         'ca_cert': ca_cert,
  128         'user': user,
  129         'password': password,
  130         'auth_mechanism': auth_mechanism,
  131         'kerberos_service_name': kerberos_service_name,
  132     }
  133 
  134     con = ImpalaConnection(pool_size=pool_size, **params)
  135     try:
  136         client = ImpalaClient(con, hdfs_client=hdfs_client)
  137     except Exception:
  138         con.close()
  139         raise
  140     else:
  141         if options.default_backend is None:
  142             options.default_backend = client
  143 
  144     return client
  145
  [end of ibis/backends/impala/__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/ibis/backends/impala/__init__.py b/ibis/backends/impala/__init__.py
  --- a/ibis/backends/impala/__init__.py
  +++ b/ibis/backends/impala/__init__.py
  @@ -103,7 +103,7 @@
       >>> hdfs_port = int(os.environ.get('IBIS_TEST_NN_PORT', 50070))
       >>> impala_host = os.environ.get('IBIS_TEST_IMPALA_HOST', 'localhost')
       >>> impala_port = int(os.environ.get('IBIS_TEST_IMPALA_PORT', 21050))
  -    >>> hdfs = ibis.hdfs_connect(host=hdfs_host, port=hdfs_port)
  +    >>> hdfs = ibis.impala.hdfs_connect(host=hdfs_host, port=hdfs_port)
       >>> hdfs  # doctest: +ELLIPSIS
       <ibis.filesystems.WebHDFS object at 0x...>
       >>> client = ibis.impala.connect(
  
verification_info: {"golden_diff": "diff --git a/ibis/backends/impala/__init__.py b/ibis/backends/impala/__init__.py\n--- a/ibis/backends/impala/__init__.py\n+++ b/ibis/backends/impala/__init__.py\n@@ -103,7 +103,7 @@\n     >>> hdfs_port = int(os.environ.get('IBIS_TEST_NN_PORT', 50070))\n     >>> impala_host = os.environ.get('IBIS_TEST_IMPALA_HOST', 'localhost')\n     >>> impala_port = int(os.environ.get('IBIS_TEST_IMPALA_PORT', 21050))\n-    >>> hdfs = ibis.hdfs_connect(host=hdfs_host, port=hdfs_port)\n+    >>> hdfs = ibis.impala.hdfs_connect(host=hdfs_host, port=hdfs_port)\n     >>> hdfs  # doctest: +ELLIPSIS\n     <ibis.filesystems.WebHDFS object at 0x...>\n     >>> client = ibis.impala.connect(\n", "issue": "link to documentation on http://ibis-project.org/ is broken\nEverything under /docs/ (including the tutorial) 404's as of 2020-12-02.\n", "before_files": [{"content": "\"\"\"Impala backend\"\"\"\nimport ibis.common.exceptions as com\nimport ibis.config\nfrom ibis.config import options\n\n# these objects are exposed in the public API and are not used in the module\nfrom .client import (  # noqa: F401\n    ImpalaClient,\n    ImpalaConnection,\n    ImpalaDatabase,\n    ImpalaTable,\n)\nfrom .compiler import dialect  # noqa: F401\nfrom .hdfs import HDFS, WebHDFS, hdfs_connect  # noqa: F401\nfrom .udf import *  # noqa: F401,F403\n\nwith ibis.config.config_prefix('impala'):\n    ibis.config.register_option(\n        'temp_db',\n        '__ibis_tmp',\n        'Database to use for temporary tables, views. functions, etc.',\n    )\n    ibis.config.register_option(\n        'temp_hdfs_path',\n        '/tmp/ibis',\n        'HDFS path for storage of temporary data',\n    )\n\n\ndef compile(expr, params=None):\n    \"\"\"Force compilation of expression.\n\n    Returns\n    -------\n    str\n\n    \"\"\"\n    from .compiler import to_sql\n\n    return to_sql(expr, dialect.make_context(params=params))\n\n\ndef verify(expr, params=None):\n    \"\"\"\n    Determine if expression can be successfully translated to execute on Impala\n    \"\"\"\n    try:\n        compile(expr, params=params)\n        return True\n    except com.TranslationError:\n        return False\n\n\ndef connect(\n    host='localhost',\n    port=21050,\n    database='default',\n    timeout=45,\n    use_ssl=False,\n    ca_cert=None,\n    user=None,\n    password=None,\n    auth_mechanism='NOSASL',\n    kerberos_service_name='impala',\n    pool_size=8,\n    hdfs_client=None,\n):\n    \"\"\"Create an ImpalaClient for use with Ibis.\n\n    Parameters\n    ----------\n    host : str, optional\n        Host name of the impalad or HiveServer2 in Hive\n    port : int, optional\n        Impala's HiveServer2 port\n    database : str, optional\n        Default database when obtaining new cursors\n    timeout : int, optional\n        Connection timeout in seconds when communicating with HiveServer2\n    use_ssl : bool, optional\n        Use SSL when connecting to HiveServer2\n    ca_cert : str, optional\n        Local path to 3rd party CA certificate or copy of server certificate\n        for self-signed certificates. If SSL is enabled, but this argument is\n        ``None``, then certificate validation is skipped.\n    user : str, optional\n        LDAP user to authenticate\n    password : str, optional\n        LDAP password to authenticate\n    auth_mechanism : str, optional\n        {'NOSASL' <- default, 'PLAIN', 'GSSAPI', 'LDAP'}.\n        Use NOSASL for non-secured Impala connections.  Use PLAIN for\n        non-secured Hive clusters.  Use LDAP for LDAP authenticated\n        connections.  Use GSSAPI for Kerberos-secured clusters.\n    kerberos_service_name : str, optional\n        Specify particular impalad service principal.\n\n    Examples\n    --------\n    >>> import ibis\n    >>> import os\n    >>> hdfs_host = os.environ.get('IBIS_TEST_NN_HOST', 'localhost')\n    >>> hdfs_port = int(os.environ.get('IBIS_TEST_NN_PORT', 50070))\n    >>> impala_host = os.environ.get('IBIS_TEST_IMPALA_HOST', 'localhost')\n    >>> impala_port = int(os.environ.get('IBIS_TEST_IMPALA_PORT', 21050))\n    >>> hdfs = ibis.hdfs_connect(host=hdfs_host, port=hdfs_port)\n    >>> hdfs  # doctest: +ELLIPSIS\n    <ibis.filesystems.WebHDFS object at 0x...>\n    >>> client = ibis.impala.connect(\n    ...     host=impala_host,\n    ...     port=impala_port,\n    ...     hdfs_client=hdfs,\n    ... )\n    >>> client  # doctest: +ELLIPSIS\n    <ibis.impala.client.ImpalaClient object at 0x...>\n\n    Returns\n    -------\n    ImpalaClient\n    \"\"\"\n    params = {\n        'host': host,\n        'port': port,\n        'database': database,\n        'timeout': timeout,\n        'use_ssl': use_ssl,\n        'ca_cert': ca_cert,\n        'user': user,\n        'password': password,\n        'auth_mechanism': auth_mechanism,\n        'kerberos_service_name': kerberos_service_name,\n    }\n\n    con = ImpalaConnection(pool_size=pool_size, **params)\n    try:\n        client = ImpalaClient(con, hdfs_client=hdfs_client)\n    except Exception:\n        con.close()\n        raise\n    else:\n        if options.default_backend is None:\n            options.default_backend = client\n\n    return client\n", "path": "ibis/backends/impala/__init__.py"}]}