internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: ibis-project/ibis

Issue:
Allow strings for types in pandas UDFs



Discussion:

Resolving patch:
diff --git a/ibis/pandas/udf.py b/ibis/pandas/udf.py
--- a/ibis/pandas/udf.py
+++ b/ibis/pandas/udf.py
@@ -318,6 +318,8 @@ def elementwise(input_type, output_type):
         ... def my_string_length(series):
         ...     return series.str.len() * 2
         """
+        input_type = list(map(dt.dtype, input_type))
+        output_type = dt.dtype(output_type)
 
         def wrapper(func):
             # validate that the input_type argument and the function signature
@@ -481,6 +483,8 @@ def _grouped(input_type, output_type, base_class, output_type_method):
         ibis.pandas.udf.reduction
         ibis.pandas.udf.analytic
         """
+        input_type = list(map(dt.dtype, input_type))
+        output_type = dt.dtype(output_type)
 
         def wrapper(func):
             funcsig = valid_function_signature(input_type, func)


Test patch:
diff --git a/ibis/pandas/tests/test_udf.py b/ibis/pandas/tests/test_udf.py
--- a/ibis/pandas/tests/test_udf.py
+++ b/ibis/pandas/tests/test_udf.py
@@ -31,7 +31,7 @@ def t(con):
     return con.table('df')
 
 
-@udf.elementwise(input_type=[dt.string], output_type=dt.int64)
+@udf.elementwise(input_type=['string'], output_type='int64')
 def my_string_length(series, **kwargs):
     return series.str.len() * 2
 
@@ -61,7 +61,7 @@ def times_two(x, scope=None):
     return x * 2.0
 
 
-@udf.analytic(input_type=[dt.double], output_type=dt.double)
+@udf.analytic(input_type=['double'], output_type='double')
 def zscore(series):
     return (series - series.mean()) / series.std()
 
@@ -244,7 +244,7 @@ def test_compose_udfs():
 
 
 def test_udaf_window():
-    @udf.reduction([dt.double], dt.double)
+    @udf.reduction(['double'], 'double')
     def my_mean(series):
         return series.mean()
Repository: ibis-project/ibis

Issue:
Dedup contributing section of the docs



Discussion:

Resolving patch:
diff --git a/docs/source/conf.py b/docs/source/conf.py
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -36,23 +36,20 @@
     'sphinx.ext.autosummary',
     'sphinx.ext.extlinks',
     'sphinx.ext.mathjax',
-    'numpydoc',
+    'sphinx.ext.napoleon',
     'nbsphinx',
     'IPython.sphinxext.ipython_directive',
     'IPython.sphinxext.ipython_console_highlighting',
     'releases',
 ]
-
+napoleon_google_docstring = False
+napoleon_numpy_docstring = True
 releases_github_path = "ibis-project/ibis"
 releases_unstable_prehistory = True
 releases_document_name = ["release"]
-
+ipython_warning_is_error = True
 autosummary_generate = glob.glob("*.rst")
 
-# autosummary_generate = True
-
-numpydoc_show_class_members = False
-
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
 


Test patch:
diff --git a/ibis/impala/tests/test_kudu_support.py b/ibis/impala/tests/test_kudu_support.py
--- a/ibis/impala/tests/test_kudu_support.py
+++ b/ibis/impala/tests/test_kudu_support.py
@@ -30,7 +30,7 @@ def __init__(self):
 
         # band-aid until Kudu support merged into Impala mainline
         self.test_host = os.getenv(
-            'IBIS_TEST_KIMPALA_HOST', 'quickstart.cloudera'
+            'IBIS_TEST_KIMPALA_HOST', 'impala'
         )
 
         # XXX
Repository: ibis-project/ibis

Issue:
PKG: Add pre-commit, black and isort to setup.py



Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -53,7 +53,14 @@
     + parquet_requires
 )
 
-develop_requires = all_requires + ['click', 'flake8', 'mypy', 'pytest>=3']
+develop_requires = all_requires + [
+    'click',
+    'flake8',
+    'isort',
+    'mypy',
+    'pre-commit',
+    'pytest>=3',
+]
 
 install_requires = [
     line.strip()
@@ -73,7 +80,8 @@
     python_requires='>=3.5',
     extras_require={
         'all': all_requires,
-        'develop': develop_requires,
+        'develop:python_version > "3.5"': develop_requires + ['black'],
+        'develop:python_version == "3.5"': develop_requires,
         'impala': impala_requires,
         'kerberos': kerberos_requires,
         'postgres': postgres_requires,


Test patch:
Repository: ibis-project/ibis

Issue:
SUPP: Tighter version spec for pytest
See comment here: https://github.com/ibis-project/ibis/commit/ec138f056fad95728a305c971d4f708fe4c858f7#commitcomment-33980739


Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -62,7 +62,7 @@
     'isort',
     'mypy',
     'pre-commit',
-    'pytest>=3',
+    'pytest>=4.5',
 ]
 
 install_requires = [


Test patch:
Repository: ibis-project/ibis

Issue:
BUG: Empty schema fails on repr
```
In [1]: import ibis
ibis.
In [2]: ibis.schema([])
Out[2]:
ValueError: max() arg is an empty sequence
```


Discussion:

Resolving patch:
diff --git a/ibis/expr/schema.py b/ibis/expr/schema.py
--- a/ibis/expr/schema.py
+++ b/ibis/expr/schema.py
@@ -36,7 +36,7 @@ def __init__(self, names, types):
             raise com.IntegrityError('Duplicate column names')
 
     def __repr__(self):
-        space = 2 + max(map(len, self.names))
+        space = 2 + max(map(len, self.names), default=0)
         return "ibis.Schema {{{}\n}}".format(
             util.indent(
                 ''.join(


Test patch:
diff --git a/ibis/expr/tests/test_schema.py b/ibis/expr/tests/test_schema.py
--- a/ibis/expr/tests/test_schema.py
+++ b/ibis/expr/tests/test_schema.py
@@ -140,3 +140,12 @@ def test_schema_subset():
 
     assert s1 >= s2
     assert s2 <= s1
+
+
+def test_empty_schema():
+    schema = ibis.schema([])
+    result = repr(schema)
+    expected = """\
+ibis.Schema {
+}"""
+    assert result == expected
Repository: ibis-project/ibis

Issue:
Union is broken in pandas backend
```
import ibis
import pandas as pd

client = ibis.pandas.connect({'t1': pd.DataFrame({'col': [1,2,3]}), 't2': pd.DataFrame({'col': [4,5,6]}))
t1 = client.table('t1')
t2 = client.table('t2')

unioned = t1.union(t2)
unioned.execute()
```

raises an exception
`NotImplementedError: Could not find signature for execute_node: <Union, DataFrame, DataFrame, bool>`
because the `distinct` `Arg` of `Union` isn't part of the execute_node signature.


Discussion:

Resolving patch:
diff --git a/ibis/pandas/execution/generic.py b/ibis/pandas/execution/generic.py
--- a/ibis/pandas/execution/generic.py
+++ b/ibis/pandas/execution/generic.py
@@ -759,9 +759,10 @@ def execute_series_distinct(op, data, **kwargs):
     return pd.Series(data.unique(), name=data.name)
 
 
-@execute_node.register(ops.Union, pd.DataFrame, pd.DataFrame)
-def execute_union_dataframe_dataframe(op, left, right, **kwargs):
-    return pd.concat([left, right], axis=0)
+@execute_node.register(ops.Union, pd.DataFrame, pd.DataFrame, bool)
+def execute_union_dataframe_dataframe(op, left, right, distinct, **kwargs):
+    result = pd.concat([left, right], axis=0)
+    return result.drop_duplicates() if distinct else result
 
 
 @execute_node.register(ops.IsNull, pd.Series)


Test patch:
diff --git a/ibis/pandas/execution/tests/test_operations.py b/ibis/pandas/execution/tests/test_operations.py
--- a/ibis/pandas/execution/tests/test_operations.py
+++ b/ibis/pandas/execution/tests/test_operations.py
@@ -817,3 +817,39 @@ def test_table_distinct(t, df):
     result = expr.execute()
     expected = df[['dup_strings']].drop_duplicates()
     tm.assert_frame_equal(result, expected)
+
+
+@pytest.mark.parametrize("distinct", [True, False])
+def test_union(client, df1, distinct):
+    t = client.table('df1')
+    expr = t.union(t, distinct=distinct)
+    result = expr.execute()
+    expected = (
+        df1 if distinct else pd.concat([df1, df1], axis=0, ignore_index=True)
+    )
+    tm.assert_frame_equal(result, expected)
+
+
+@pytest.mark.parametrize(
+    "distinct",
+    [
+        pytest.param(
+            True,
+            marks=pytest.mark.xfail(
+                raises=TypeError,
+                reason=(
+                    "Pandas cannot compute the distinct element of an "
+                    "array column"
+                ),
+            ),
+        ),
+        False,
+    ],
+)
+def test_union_with_list_types(t, df, distinct):
+    expr = t.union(t, distinct=distinct)
+    result = expr.execute()
+    expected = (
+        df if distinct else pd.concat([df, df], axis=0, ignore_index=True)
+    )
+    tm.assert_frame_equal(result, expected)
Repository: ibis-project/ibis

Issue:
ENH: Support Arrow timezone-aware timestamps
Ibis does not currently recognize timezone-aware Arrow timestamps


Discussion:

Resolving patch:
diff --git a/ibis/file/parquet.py b/ibis/file/parquet.py
--- a/ibis/file/parquet.py
+++ b/ibis/file/parquet.py
@@ -29,8 +29,6 @@
     'string': dt.String,
     'binary': dt.Binary,
     'bool': dt.Boolean,
-    'timestamp[ns]': dt.Timestamp,
-    'timestamp[us]': dt.Timestamp,
 }
 
 
@@ -39,6 +37,11 @@ def pa_dtype(arrow_type, nullable=True):
     return _arrow_dtypes[str(arrow_type)](nullable=nullable)
 
 
+@dt.dtype.register(pa.lib.TimestampType)
+def pa_timestamp_type(arrow_type, nullable=True):
+    return dt.Timestamp(arrow_type.tz, nullable=nullable)
+
+
 @sch.infer.register(pq.ParquetSchema)
 def infer_parquet_schema(schema):
     pairs = []


Test patch:
diff --git a/ibis/file/tests/test_schema.py b/ibis/file/tests/test_schema.py
--- a/ibis/file/tests/test_schema.py
+++ b/ibis/file/tests/test_schema.py
@@ -27,6 +27,9 @@
         (pa.float64(), dt.float64),
         (pa.string(), dt.string),
         (pa.timestamp('ns'), dt.timestamp),
+        (pa.timestamp('us'), dt.timestamp),
+        (pa.timestamp('ns', 'UTC'), dt.Timestamp('UTC')),
+        (pa.timestamp('us', 'Europe/Paris'), dt.Timestamp('Europe/Paris')),
     ],
     ids=lambda x: str(x),
 )
Repository: ibis-project/ibis

Issue:
OmniSciDB explain: OmniSciIbisClient object has no attribute _get_list
Ibis version 1.2.0.

```python
t = con.table('omnisci_states')
con.explain(t)
```

```
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-87b5b30967dc> in <module>
----> 1 con.explain(t)

/opt/conda/lib/python3.7/site-packages/ibis_framework-1.2.0-py3.7.egg/ibis/client.py in explain(self, expr, params)
    246 
    247         with self._execute(statement, results=True) as cur:
--> 248             result = self._get_list(cur)
    249 
    250         return 'Query:\n{0}\n\n{1}'.format(

AttributeError: 'OmniSciIbisClient' object has no attribute '_get_list'
```



Discussion:

Resolving patch:
diff --git a/ibis/omniscidb/client.py b/ibis/omniscidb/client.py
--- a/ibis/omniscidb/client.py
+++ b/ibis/omniscidb/client.py
@@ -502,6 +502,10 @@ def _fully_qualified_name(self, name, database):
         # OmniSciDB raises error sometimes with qualified names
         return name
 
+    def _get_list(self, cur):
+        tuples = cur.cursor.fetchall()
+        return [v[0] for v in tuples]
+
     def _get_schema_using_query(self, query):
         with self._execute(query, results=True) as result:
             # resets the state of the cursor and closes operation


Test patch:
diff --git a/ibis/omniscidb/tests/test_client.py b/ibis/omniscidb/tests/test_client.py
--- a/ibis/omniscidb/tests/test_client.py
+++ b/ibis/omniscidb/tests/test_client.py
@@ -153,3 +153,8 @@ def test_create_table_schema(con):
 def test_sql(con, sql):
     # execute the expression using SQL query
     con.sql(sql).execute()
+
+
+def test_explain(con, alltypes):
+    # execute the expression using SQL query
+    con.explain(alltypes)
Repository: ibis-project/ibis

Issue:
More informative IntegrityError on duplicate columns
```
~/Workspace/ibis/ibis/expr/schema.py in __init__(self, names, types)
     32 
     33         if len(self._name_locs) < len(self.names):
---> 34             raise com.IntegrityError('Duplicate column names')
     35 
     36     def __repr__(self):

IntegrityError: Duplicate column names
```

List the particular columns at least.


Discussion:

Resolving patch:
diff --git a/ibis/expr/schema.py b/ibis/expr/schema.py
--- a/ibis/expr/schema.py
+++ b/ibis/expr/schema.py
@@ -33,7 +33,11 @@ def __init__(self, names, types):
         self._name_locs = dict((v, i) for i, v in enumerate(self.names))
 
         if len(self._name_locs) < len(self.names):
-            raise com.IntegrityError('Duplicate column names')
+            duplicate_names = list(self.names)
+            for v in self._name_locs.keys():
+                duplicate_names.remove(v)
+            raise com.IntegrityError(
+                'Duplicate column name(s): {}'.format(duplicate_names))
 
     def __repr__(self):
         space = 2 + max(map(len, self.names), default=0)


Test patch:
Repository: ibis-project/ibis

Issue:
Implement Interval arithmetic on one or more backends
After subtraction is in from #1489, we'll want to implement this on at least one backend.


Discussion:

Resolving patch:
diff --git a/ibis/pandas/execution/temporal.py b/ibis/pandas/execution/temporal.py
--- a/ibis/pandas/execution/temporal.py
+++ b/ibis/pandas/execution/temporal.py
@@ -184,7 +184,9 @@ def execute_timestamp_sub_series_timedelta(op, left, right, **kwargs):
 
 
 @execute_node.register(
-    (ops.TimestampDiff, ops.TimestampSub), pd.Series, pd.Series
+    (ops.TimestampDiff, ops.TimestampSub, ops.IntervalSubtract),
+    pd.Series,
+    pd.Series
 )
 def execute_timestamp_diff_sub_series_series(op, left, right, **kwargs):
     return left - right


Test patch:
diff --git a/ibis/pandas/execution/tests/test_temporal.py b/ibis/pandas/execution/tests/test_temporal.py
--- a/ibis/pandas/execution/tests/test_temporal.py
+++ b/ibis/pandas/execution/tests/test_temporal.py
@@ -147,6 +147,7 @@ def test_times_ops_with_tz(t, df, tz, rconstruct, column):
     ('op', 'expected'),
     [
         param(lambda x, y: x + y, lambda x, y: x.values * 2, id='add'),
+        param(lambda x, y: x - y, lambda x, y: x.values - y.values, id='sub'),
         param(lambda x, y: x * 2, lambda x, y: x.values * 2, id='mul'),
         param(
             lambda x, y: x // 2,
Repository: ibis-project/ibis

Issue:
BUG: Graphviz repr should escape HTML
The current notebook graphviz repr breaks when there are unintentional HTML characters in column names or types. An example of this is array types, which includes angle brackets, so a type like `array<string>` fails to render because it produces invalid HTML.

The fix is fairly straightforward: names and columns should be escaped. I should be able to submit a PR.


Discussion:

Resolving patch:
diff --git a/ibis/expr/visualize.py b/ibis/expr/visualize.py
--- a/ibis/expr/visualize.py
+++ b/ibis/expr/visualize.py
@@ -1,4 +1,5 @@
 import tempfile
+from html import escape
 
 import graphviz as gv
 
@@ -42,7 +43,9 @@ def get_type(expr):
 
     return (
         ''.join(
-            '<BR ALIGN="LEFT" />  <I>{}</I>: {}'.format(name, type)
+            '<BR ALIGN="LEFT" />  <I>{}</I>: {}'.format(
+                escape(name), escape(str(type))
+            )
             for name, type in zip(schema.names, schema.types)
         )
         + '<BR ALIGN="LEFT" />'
@@ -53,7 +56,7 @@ def get_label(expr, argname=None):
     import ibis.expr.operations as ops
 
     node = expr.op()
-    typename = get_type(expr)
+    typename = get_type(expr)  # Already an escaped string
     name = type(node).__name__
     nodename = getattr(node, 'name', argname)
     if nodename is not None:
@@ -61,13 +64,13 @@ def get_label(expr, argname=None):
             label_fmt = '<<I>{}</I>: <B>{}</B>{}>'
         else:
             label_fmt = '<<I>{}</I>: <B>{}</B> \u27f6 {}>'
-        label = label_fmt.format(nodename, name, typename)
+        label = label_fmt.format(escape(nodename), escape(name), typename)
     else:
         if isinstance(node, ops.TableNode):
             label_fmt = '<<B>{}</B>{}>'
         else:
             label_fmt = '<<B>{}</B> \u27f6 {}>'
-        label = label_fmt.format(name, typename)
+        label = label_fmt.format(escape(name), typename)
     return label
 
 


Test patch:
diff --git a/ibis/expr/tests/test_visualize.py b/ibis/expr/tests/test_visualize.py
--- a/ibis/expr/tests/test_visualize.py
+++ b/ibis/expr/tests/test_visualize.py
@@ -144,3 +144,10 @@ def test_asof_join():
     result = joined[left, right.foo]
     graph = viz.to_graph(result)
     assert key(result) in graph.source
+
+
+def test_html_escape():
+    # Check that we correctly escape HTML <> characters in the graphviz
+    # representation. If an error is thrown, _repr_png_ returns None.
+    expr = ibis.table([('<a & b>', ibis.expr.datatypes.Array('string'))])
+    assert expr._repr_png_() is not None
Repository: ibis-project/ibis

Issue:
BUG: [omniscidb] add OSError as an possible exception when importing GPUDataFrame
When using ibis where cudf is installed, but if it is not running on GPU, it raises this error:

```
/opt/conda/lib/python3.7/site-packages/ibis/omniscidb/client.py in <module>
     26 
     27 try:
---> 28     from cudf.dataframe.dataframe import DataFrame as GPUDataFrame
     29 except ImportError:
     30     GPUDataFrame = None
...
OSError: cannot load library '/opt/conda/lib/librmm.so': /usr/lib/x86_64-linux-gnu/libcuda.so.1: file too short
```



Discussion:

Resolving patch:
diff --git a/ibis/omniscidb/client.py b/ibis/omniscidb/client.py
--- a/ibis/omniscidb/client.py
+++ b/ibis/omniscidb/client.py
@@ -20,7 +20,7 @@
 
 try:
     from cudf.dataframe.dataframe import DataFrame as GPUDataFrame
-except ImportError:
+except (ImportError, OSError):
     GPUDataFrame = None
 
 # used to check if geopandas and shapely is available


Test patch:
Repository: ibis-project/ibis

Issue:
datamgr.py fails if IBIS_TEST_OMNISCIDB_DATABASE=omnisci
If I try to use default omniscidb database name `omnisci`, then variable database doesn't get initialized in line 377 and I get an exception like this:

```
Traceback (most recent call last):
  File "./datamgr.py", line 623, in <module>
    cli(auto_envvar_prefix='IBIS_TEST')
  File "/nfs/site/home/gashiman/.local/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/nfs/site/home/gashiman/.local/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/nfs/site/home/gashiman/.local/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/nfs/site/home/gashiman/.local/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/nfs/site/home/gashiman/.local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "./datamgr.py", line 377, in omniscidb
    dbname=database,
UnboundLocalError: local variable 'database' referenced before assignment
```

Suggested fix is to initialize `database` variable:
```
diff --git a/ci/datamgr.py b/ci/datamgr.py
index f36705a..b0c7eda 100755
--- a/ci/datamgr.py
+++ b/ci/datamgr.py
@@ -368,6 +368,8 @@ def omniscidb(schema, tables, data_directory, **params):
         except Exception:
             logger.exception('OmniSci DDL statement %r failed', stmt)
         conn.close()
+    else:
+        database = default_db

     conn = pymapd.connect(
         host=params['host'],
```


Discussion:

Resolving patch:
diff --git a/ci/datamgr.py b/ci/datamgr.py
--- a/ci/datamgr.py
+++ b/ci/datamgr.py
@@ -346,7 +346,9 @@ def omniscidb(schema, tables, data_directory, **params):
     # connection
     logger.info('Initializing OmniSci...')
     default_db = 'omnisci'
-    if params['database'] != default_db:
+    database = params["database"]
+
+    if database != default_db:
         conn = pymapd.connect(
             host=params['host'],
             user=params['user'],
@@ -355,7 +357,6 @@ def omniscidb(schema, tables, data_directory, **params):
             dbname=default_db,
             protocol=params['protocol'],
         )
-        database = params["database"]
         stmt = "DROP DATABASE IF EXISTS {}".format(database)
         try:
             conn.execute(stmt)


Test patch:
Repository: ibis-project/ibis

Issue:
BUG: load test datasets CI step failed
```Traceback (most recent call last):
  File "/ibis/ci/datamgr.py", line 624, in <module>
    cli(auto_envvar_prefix='IBIS_TEST')
  File "/opt/conda/envs/ibis-env/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/opt/conda/envs/ibis-env/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/opt/conda/envs/ibis-env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/conda/envs/ibis-env/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/conda/envs/ibis-env/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/ibis/ci/datamgr.py", line 462, in clickhouse
    engine = init_database('clickhouse+native', params, schema)
  File "/ibis/ci/datamgr.py", line 65, in init_database
    recreate_database(driver, new_params, **kwargs)
  File "/ibis/ci/datamgr.py", line 53, in recreate_database
    engine = sa.create_engine(url, **kwargs)
  File "/opt/conda/envs/ibis-env/lib/python3.6/site-packages/sqlalchemy/engine/__init__.py", line 479, in create_engine
    return strategy.create(*args, **kwargs)
  File "/opt/conda/envs/ibis-env/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py", line 61, in create
    entrypoint = u._get_entrypoint()
  File "/opt/conda/envs/ibis-env/lib/python3.6/site-packages/sqlalchemy/engine/url.py", line 172, in _get_entrypoint
    cls = registry.load(name)
  File "/opt/conda/envs/ibis-env/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 237, in load
    return impl.load()
  File "/opt/conda/envs/ibis-env/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2444, in load
    self.require(*args, **kwargs)
  File "/opt/conda/envs/ibis-env/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2467, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/opt/conda/envs/ibis-env/lib/python3.6/site-packages/pkg_resources/__init__.py", line 792, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (clickhouse-driver 0.1.1 (/opt/conda/envs/ibis-env/lib/python3.6/site-packages), Requirement.parse('clickhouse-driver>=0.1.2'))
```


Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -26,7 +26,7 @@
 kerberos_requires = ['requests-kerberos']
 visualization_requires = ['graphviz']
 clickhouse_requires = [
-    'clickhouse-driver>=0.0.8,<0.1.2',
+    'clickhouse-driver>=0.1.3',
     'clickhouse-cityhash',
 ]
 bigquery_requires = ['google-cloud-bigquery>=1.0.0', 'pydata-google-auth']


Test patch:
Repository: ibis-project/ibis

Issue:
BUG: OmniSciDBTable rewrites the method: `drop` inherited from TableExpr with behavior change
**Problem**:
- `TableExpr.drop` is used for drop columns, but `OmniSciDBTable.drop` can be only used for drop the table from database.

**Workaround**: 
- `table[table].drop(fields)` where `type(table) = <class 'ibis.omniscidb.client.OmniSciDBTable'>`.

**Proposed solutions**:
- rename `OmniSciDBTable.drop` -> `OmniSciDBTable.drop_table`
- remove `drop` method from `OmnisciDBTable` class and using `OmniSciDBClient.drop_table` instead (I prefer this option)



Discussion:

Resolving patch:
diff --git a/ibis/omniscidb/client.py b/ibis/omniscidb/client.py
--- a/ibis/omniscidb/client.py
+++ b/ibis/omniscidb/client.py
@@ -384,10 +384,6 @@ def metadata(self):
 
     describe_formatted = metadata
 
-    def drop(self):
-        """Drop the table from the database."""
-        self._client.drop_table_or_view(self._qualified_name)
-
     def truncate(self):
         """Delete all rows from, but do not drop, an existing table."""
         self._client.truncate_table(self._qualified_name)


Test patch: