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

Issue:
Schema output doesn't show if the field is non-nullable
The current schema doesn't show if the field is non-nullable

```python
>>> ibis.schema([
...     ('foo', 'int64'),
...     ('bar', ibis.expr.datatypes.int64(nullable=False)),
...     ('baz', 'boolean*')
... ])

ibis.Schema {  
  foo  int64
  bar  int64
  baz  boolean
}

```

*Desired behavior*:

The output should show if the type is non-nullable, eg:

```
ibis.Schema {  
  foo  int64
  bar  int64[non-nullable]
  baz  boolean
}
```


Discussion:
suggestion: change `DataType.__str__` method:

```
diff --git a/ibis/expr/datatypes.py b/ibis/expr/datatypes.py
index 9f469fb9..ec9998c9 100644
--- a/ibis/expr/datatypes.py
+++ b/ibis/expr/datatypes.py
@@ -83,7 +83,10 @@ class DataType:
         )
 
     def __str__(self) -> str:
-        return self.name.lower()
+        return '{}{}'.format(
+            self.name.lower(),
+            '[non-nullable]' if not self.nullable else ''
+        )
 
     @property
     def name(self) -> str:
```

Resolving patch:
diff --git a/ibis/expr/datatypes.py b/ibis/expr/datatypes.py
--- a/ibis/expr/datatypes.py
+++ b/ibis/expr/datatypes.py
@@ -83,7 +83,9 @@ def __repr__(self) -> str:
         )
 
     def __str__(self) -> str:
-        return self.name.lower()
+        return '{}{}'.format(
+            self.name.lower(), '[non-nullable]' if not self.nullable else ''
+        )
 
     @property
     def name(self) -> str:


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
@@ -149,3 +149,20 @@ def test_empty_schema():
 ibis.Schema {
 }"""
     assert result == expected
+
+
+def test_nullable_output():
+    sch = ibis.schema(
+        [
+            ('foo', 'int64'),
+            ('bar', ibis.expr.datatypes.int64(nullable=False)),
+            ('baz', 'boolean*'),
+        ]
+    )
+
+    sch_str = str(sch)
+    assert 'foo  int64' in sch_str
+    assert 'foo  int64[non-nullable]' not in sch_str
+    assert 'bar  int64[non-nullable]' in sch_str
+    assert 'baz  boolean' in sch_str
+    assert 'baz  boolean[non-nullable]' not in sch_str
Repository: ibis-project/ibis

Issue:
FEAT: [Omnisci] fillna and nullif implementations
Omnisci doesn't support ISNULL() function, but it is possible to replace it with another sql request.


Discussion:

Resolving patch:
diff --git a/ibis/omniscidb/operations.py b/ibis/omniscidb/operations.py
--- a/ibis/omniscidb/operations.py
+++ b/ibis/omniscidb/operations.py
@@ -481,6 +481,19 @@ def _cross_join(translator, expr):
     return translator.translate(left.join(right, ibis.literal(True)))
 
 
+def _ifnull(translator, expr):
+    col_expr, value_expr = expr.op().args
+    if isinstance(col_expr, ir.DecimalValue) and isinstance(
+        value_expr, ir.IntegerValue
+    ):
+        value_expr = value_expr.cast(col_expr.type())
+    col_name = translator.translate(col_expr)
+    value = translator.translate(value_expr)
+    return 'CASE WHEN {} IS NULL THEN {} ELSE {} END'.format(
+        col_name, value, col_name
+    )
+
+
 def literal(translator, expr: ibis.expr.operations.Literal) -> str:
     """Create a translator for literal operations.
 
@@ -1011,6 +1024,8 @@ def formatter(translator, expr):
     ops.Where: _where,
     ops.TableColumn: _table_column,
     ops.CrossJoin: _cross_join,
+    ops.IfNull: _ifnull,
+    ops.NullIf: fixed_arity('nullif', 2),
     ops.IsNan: unary('isNan'),
 }
 
@@ -1043,10 +1058,8 @@ def formatter(translator, expr):
     ops.NTile,
     ops.NthValue,
     ops.GroupConcat,
-    ops.NullIf,
     ops.NullIfZero,
     ops.IsInf,
-    ops.IfNull,
     # string
     ops.Lowercase,
     ops.Uppercase,


Test patch:
diff --git a/ibis/tests/all/test_generic.py b/ibis/tests/all/test_generic.py
--- a/ibis/tests/all/test_generic.py
+++ b/ibis/tests/all/test_generic.py
@@ -8,6 +8,7 @@
     BigQuery,
     Clickhouse,
     MySQL,
+    OmniSciDB,
     PostgreSQL,
     PySpark,
     Spark,
@@ -28,6 +29,7 @@
                     BigQuery,
                     Clickhouse,
                     MySQL,
+                    OmniSciDB,
                     PostgreSQL,
                     Spark,
                     SQLite,
Repository: ibis-project/ibis

Issue:
Interactive mode doesn't work in Jupyter
Running the next code in the terminal works as expected, `.count()` returns the number of rows as an `int`, since the option `interactive` is set to `True`:
```python
>>> import ibis
>>> print(ibis.__version__)
1.3.0+24.gd00a112.dirty
>>> ibis.options.interactive = True
>>> conn = ibis.sqlite.connect('geography.db')
>>> conn.table('countries').count()
252
```
But running the same exact code in a notebook returns the expression visualization instead:

![ibis_interactive_bug](https://user-images.githubusercontent.com/10058240/77928929-f7720500-72a0-11ea-9ffb-080eb810c10a.png)



Discussion:
@xmnlab do you mind having a quick look and let me know if this is indeed a bug, or am I missing something? I'll have a look if it's a bug. Thanks!
@datapythonista it looks a bug. I tried here and I saw the same behavior.

Resolving patch:
diff --git a/ibis/expr/types.py b/ibis/expr/types.py
--- a/ibis/expr/types.py
+++ b/ibis/expr/types.py
@@ -79,7 +79,7 @@ def _key(self):
         return type(self), self._safe_name, self.op()
 
     def _repr_png_(self):
-        if not ibis.options.graphviz_repr:
+        if config.options.interactive or not ibis.options.graphviz_repr:
             return None
         try:
             import ibis.expr.visualize as viz


Test patch:
diff --git a/ibis/expr/tests/test_interactive.py b/ibis/expr/tests/test_interactive.py
--- a/ibis/expr/tests/test_interactive.py
+++ b/ibis/expr/tests/test_interactive.py
@@ -14,6 +14,8 @@
 
 import unittest
 
+import pytest
+
 import ibis.config as config
 from ibis.expr.tests.mocks import MockConnection
 
@@ -30,6 +32,22 @@ def test_interactive_execute_on_repr(self):
 
         assert len(self.con.executed_queries) > 0
 
+    def test_repr_png_is_none_in_interactive(self):
+        table = self.con.table('functional_alltypes')
+
+        with config.option_context('interactive', True):
+            assert table._repr_png_() is None
+
+    def test_repr_png_is_not_none_in_not_interactive(self):
+        pytest.importorskip('ibis.expr.visualize')
+
+        table = self.con.table('functional_alltypes')
+
+        with config.option_context(
+            'interactive', False
+        ), config.option_context('graphviz_repr', True):
+            assert table._repr_png_() is not None
+
     def test_default_limit(self):
         table = self.con.table('functional_alltypes')
Repository: ibis-project/ibis

Issue:
ENH: Add support for window operation to ibis.sqlite
Currently ibis.sqlite doesn't support window operations but sqlite supports such functions (https://www.sqlitetutorial.net/sqlite-window-functions/).


Discussion:

Resolving patch:
diff --git a/ibis/sql/sqlite/compiler.py b/ibis/sql/sqlite/compiler.py
--- a/ibis/sql/sqlite/compiler.py
+++ b/ibis/sql/sqlite/compiler.py
@@ -24,6 +24,7 @@
 from ibis.sql.alchemy import _variance_reduction, fixed_arity, unary, varargs
 
 _operation_registry = alch._operation_registry.copy()
+_operation_registry.update(alch._window_functions)
 
 
 def _cast(t, expr):


Test patch:
diff --git a/ibis/tests/all/test_window.py b/ibis/tests/all/test_window.py
--- a/ibis/tests/all/test_window.py
+++ b/ibis/tests/all/test_window.py
@@ -13,6 +13,7 @@
     PostgreSQL,
     PySpark,
     Spark,
+    SQLite,
 )
 
 
@@ -112,7 +113,7 @@
         ),
         param(
             # notany() over window not supported in Impala, PostgreSQL,
-            # Spark and MySQL backends
+            # Spark, MySQL and SQLite backends
             lambda t, win: (t.double_col == 0).notany().over(win),
             lambda t: (
                 t.double_col.expanding()
@@ -122,7 +123,7 @@
             ),
             id='cumnotany',
             marks=pytest.mark.xfail_backends(
-                (Impala, PostgreSQL, Spark, MySQL)
+                (Impala, PostgreSQL, Spark, MySQL, SQLite)
             ),
         ),
         param(
@@ -137,7 +138,7 @@
         ),
         param(
             # notall() over window not supported in Impala, PostgreSQL,
-            # Spark and MySQL backends
+            # Spark, MySQL and SQLite backends
             lambda t, win: (t.double_col == 0).notall().over(win),
             lambda t: (
                 t.double_col.expanding()
@@ -147,7 +148,7 @@
             ),
             id='cumnotall',
             marks=pytest.mark.xfail_backends(
-                (Impala, PostgreSQL, Spark, MySQL)
+                (Impala, PostgreSQL, Spark, MySQL, SQLite)
             ),
         ),
         param(
diff --git a/ibis/tests/backends.py b/ibis/tests/backends.py
--- a/ibis/tests/backends.py
+++ b/ibis/tests/backends.py
@@ -285,7 +285,7 @@ def connect(data_directory: Path) -> ibis.client.Client:
 class SQLite(Backend, RoundAwayFromZero):
     supports_arrays = False
     supports_arrays_outside_of_select = supports_arrays
-    supports_window_operations = False
+    supports_window_operations = True
     check_dtype = False
     returned_timestamp_unit = 's'
Repository: ibis-project/ibis

Issue:
BUG: Pandas backend missing float16 and float32 type
This is a really easy fix, the entries
```python
dt.float16: np.float16, dt.float32: np.float32
```
are just missing from the IBIS_TYPE_TO_PANDAS_TYPE dictionary


Discussion:

Resolving patch:
diff --git a/ibis/pandas/execution/constants.py b/ibis/pandas/execution/constants.py
--- a/ibis/pandas/execution/constants.py
+++ b/ibis/pandas/execution/constants.py
@@ -28,6 +28,9 @@
 
 
 IBIS_TYPE_TO_PANDAS_TYPE = {
+    dt.float16: np.float16,
+    dt.float32: np.float32,
+    dt.float64: np.float64,
     dt.float: np.float32,
     dt.double: np.float64,
     dt.int8: np.int8,


Test patch:
diff --git a/ibis/pandas/execution/tests/test_cast.py b/ibis/pandas/execution/tests/test_cast.py
--- a/ibis/pandas/execution/tests/test_cast.py
+++ b/ibis/pandas/execution/tests/test_cast.py
@@ -15,6 +15,9 @@
 @pytest.mark.parametrize(
     ('to', 'expected'),
     [
+        ('float16', 'float16'),
+        ('float32', 'float32'),
+        ('float64', 'float64'),
         ('double', 'float64'),
         ('float', 'float32'),
         ('int8', 'int8'),
Repository: ibis-project/ibis

Issue:
BUG: Multiple aliases on the same column not behaving as expected

``` python
column = table.some_column
table.projection(
        [
            column.name("alias1"),
            column.name("alias2"),
            column.name("alias3"),
        ]
    )
```

I think the expected behavior would be a table expression with:
```
Selection[table]
  table:
    Table: ref_0
  selections:
    alias1 = Column[float64*] 'some_column' from table
      ref_0
    alias2 = Column[float64*] 'some_column' from table
      ref_0
    alias3 = Column[float64*] 'some_column' from table
      ref_0
```

However, the result I'm getting is:
```
Selection[table]
  table:
    Table: ref_0
  selections:
    alias1 = Column[float64*] 'some_column' from table
      ref_0
    alias1 = Column[float64*] 'some_column' from table
      ref_0
    alias1 = Column[float64*] 'some_column' from table
      ref_0
```


Discussion:

Resolving patch:
diff --git a/ibis/expr/format.py b/ibis/expr/format.py
--- a/ibis/expr/format.py
+++ b/ibis/expr/format.py
@@ -248,7 +248,7 @@ def visit(what, extra_indents=0):
 
     def _format_subexpr(self, expr):
         subexprs = self.memo.subexprs
-        key = expr.op()
+        key = expr._key
         try:
             result = subexprs[key]
         except KeyError:


Test patch:
diff --git a/ibis/expr/tests/test_format.py b/ibis/expr/tests/test_format.py
--- a/ibis/expr/tests/test_format.py
+++ b/ibis/expr/tests/test_format.py
@@ -246,3 +246,25 @@ def output_type(self):
   second_arg:
     2.0"""
     assert result == expected
+
+
+def test_same_column_multiple_aliases():
+    table = ibis.table([('col', 'int64')], name='t')
+    expr = table[table.col.name('alias1'), table.col.name('alias2')]
+    result = repr(expr)
+    expected = """\
+ref_0
+UnboundTable[table]
+  name: t
+  schema:
+    col : int64
+
+Selection[table]
+  table:
+    Table: ref_0
+  selections:
+    alias1 = Column[int64*] 'col' from table
+      ref_0
+    alias2 = Column[int64*] 'col' from table
+      ref_0"""
+    assert result == expected
Repository: ibis-project/ibis

Issue:
DEPS: drop 3.6
its time.


Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -79,7 +79,7 @@
     version=versioneer.get_version(),
     cmdclass=versioneer.get_cmdclass(),
     install_requires=install_requires,
-    python_requires='>=3.6',
+    python_requires='>=3.7',
     extras_require={
         'all': all_requires,
         'develop': develop_requires,


Test patch:
Repository: ibis-project/ibis

Issue:
remove requests dep
https://github.com/ibis-project/ibis/pull/2385/files#r491220098

should just move the import inside


Discussion:

Resolving patch:
diff --git a/ibis/filesystems.py b/ibis/filesystems.py
--- a/ibis/filesystems.py
+++ b/ibis/filesystems.py
@@ -19,8 +19,6 @@
 
 import posixpath
 
-import requests
-
 import ibis.common.exceptions as com
 from ibis.config import options
 
@@ -697,6 +695,8 @@ def hdfs_connect(
     WebHDFS
 
     """
+    import requests
+
     if session is None:
         session = requests.Session()
     session.verify = verify


Test patch:
Repository: ibis-project/ibis

Issue:
fix bigquery version
https://dev.azure.com/ibis-project/ibis/_build/results?buildId=3396&view=logs&j=8f09edc2-e3b7-52de-126a-0225c4f3efa1&t=78a72aec-b398-558e-7c0d-2d33604b9e53

I think we need to limit the upper bound of bigquery library here.


Discussion:
cc @tswast (IIRC you just did this for pandas-gbq)
Yes, `google-cloud-bigquery` 2.0 made some breaking changes in the `google.cloud.bigquery_v2` package, though I wasn't expecting the stacktrace you've linked to. It appears there are incompatible versions of protobuf.

Makes sense to add an upper bound / pin on BQ.

**Edit** removed note about pandas-gbq, as ibis is using google-cloud-bigquery directly

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -29,7 +29,10 @@
     'clickhouse-driver>=0.1.3',
     'clickhouse-cityhash',
 ]
-bigquery_requires = ['google-cloud-bigquery>=1.12.0', 'pydata-google-auth']
+bigquery_requires = [
+    'google-cloud-bigquery[bqstorage,pandas]>=1.12.0,<2.0.0dev',
+    'pydata-google-auth',
+]
 hdf5_requires = ['tables>=3.0.0']
 
 parquet_requires = ['pyarrow>=0.12.0']


Test patch:
Repository: ibis-project/ibis

Issue:
Drop hdfs functions from Ibis top-level module
In #2497, `ibis.HDFS`, `ibis.hdfs_connect`... have been moved to the Impala backend where they belong, and started to raise a `FutureWarning` if called directly from the top `ibis` module.

After releasing (maybe more than once, not sure what will make sense), we should drop them them complete from `ibis` and leave them only in `ibis.impala`.


Discussion:
@jreback ok to remove those in the next version? Since we're already showing a `FutureWarning` and we are planning to release a major version next (2.0), I think this is reasonable.

Removing them will make my life easier and the code cleaner with the entrypoints stuff.

Resolving patch:
diff --git a/ci/impalamgr.py b/ci/impalamgr.py
--- a/ci/impalamgr.py
+++ b/ci/impalamgr.py
@@ -36,7 +36,7 @@
 
 
 def make_ibis_client(env):
-    hc = ibis.hdfs_connect(
+    hc = ibis.impala.hdfs_connect(
         host=env.nn_host,
         port=env.webhdfs_port,
         auth_mechanism=env.auth_mechanism,
diff --git a/ibis/__init__.py b/ibis/__init__.py
--- a/ibis/__init__.py
+++ b/ibis/__init__.py
@@ -1,5 +1,4 @@
 """Initialize Ibis module."""
-import warnings
 from contextlib import suppress
 
 import ibis.config
@@ -89,20 +88,3 @@
 
 __version__ = get_versions()['version']
 del get_versions
-
-
-def __getattr__(name):
-    if name in ('HDFS', 'WebHDFS', 'hdfs_connect'):
-        warnings.warn(
-            f'`ibis.{name}` has been deprecated and will be removed in a '
-            f'future version, use `ibis.impala.{name}` instead',
-            FutureWarning,
-            stacklevel=2,
-        )
-        if 'impala' in globals():
-            return getattr(impala, name)
-        else:
-            raise AttributeError(
-                f'`ibis.{name}` requires impala backend to be installed'
-            )
-    raise AttributeError


Test patch:
Repository: ibis-project/ibis

Issue:
CLN: Remove or consolidate dev dependencies from setup.py and environment.yml
I noticed in https://github.com/ibis-project/ibis/pull/2547#issue-529169508 that the dev dependencies are not in sync in https://github.com/ibis-project/ibis/blob/master/setup.py#L63 and https://github.com/ibis-project/ibis/blob/master/environment.yml#L24

`environment.yml` looks more up to date; the dev dependencies in `setup.py` should either be synced with that file or just removed.


Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -60,18 +60,6 @@
     + dask_requires
 )
 
-develop_requires = all_requires + [
-    'black',
-    'click',
-    'pydocstyle==4.0.1',
-    'flake8',
-    'isort',
-    'mypy',
-    'pre-commit',
-    'pygit2',
-    'pytest>=4.5',
-]
-
 install_requires = [
     line.strip()
     for line in pathlib.Path(__file__)
@@ -90,7 +78,6 @@
     python_requires='>=3.7',
     extras_require={
         'all': all_requires,
-        'develop': develop_requires,
         'impala': impala_requires,
         'kerberos': kerberos_requires,
         'postgres': postgres_requires,


Test patch:
Repository: ibis-project/ibis

Issue:
link to documentation on http://ibis-project.org/ is broken
Everything under /docs/ (including the tutorial) 404's as of 2020-12-02.


Discussion:

Resolving patch:
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 @@ def connect(
     >>> 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(


Test patch:
diff --git a/ibis/backends/impala/tests/conftest.py b/ibis/backends/impala/tests/conftest.py
--- a/ibis/backends/impala/tests/conftest.py
+++ b/ibis/backends/impala/tests/conftest.py
@@ -118,7 +118,7 @@ def hdfs(env, tmp_dir):
     if env.auth_mechanism in {'GSSAPI', 'LDAP'}:
         warnings.warn("Ignoring invalid Certificate Authority errors")
 
-    client = ibis.hdfs_connect(
+    client = ibis.impala.hdfs_connect(
         host=env.nn_host,
         port=env.webhdfs_port,
         auth_mechanism=env.auth_mechanism,
diff --git a/ibis/backends/impala/tests/test_hdfs.py b/ibis/backends/impala/tests/test_hdfs.py
--- a/ibis/backends/impala/tests/test_hdfs.py
+++ b/ibis/backends/impala/tests/test_hdfs.py
@@ -56,7 +56,7 @@ def setUpClass(cls):
         cls.tmp_dir = pjoin(cls.ENV.tmp_dir, util.guid())
         if cls.ENV.auth_mechanism in ['GSSAPI', 'LDAP']:
             print("Warning: ignoring invalid Certificate Authority errors")
-        cls.hdfs = ibis.hdfs_connect(
+        cls.hdfs = ibis.impala.hdfs_connect(
             host=cls.ENV.nn_host,
             port=cls.ENV.webhdfs_port,
             auth_mechanism=cls.ENV.auth_mechanism,
@@ -393,7 +393,7 @@ def setUpClass(cls):
         if cls.ENV.auth_mechanism in ['GSSAPI', 'LDAP']:
             print("Warning: ignoring invalid Certificate Authority errors")
         # NOTE: specifying superuser as set in IbisTestEnv
-        cls.hdfs = ibis.hdfs_connect(
+        cls.hdfs = ibis.impala.hdfs_connect(
             host=cls.ENV.nn_host,
             port=cls.ENV.webhdfs_port,
             auth_mechanism=cls.ENV.auth_mechanism,
diff --git a/ibis/tests/backends.py b/ibis/tests/backends.py
--- a/ibis/tests/backends.py
+++ b/ibis/tests/backends.py
@@ -519,7 +519,7 @@ def connect(data_directory: Path) -> ibis.client.Client:
         from ibis.backends.impala.tests.conftest import IbisTestEnv
 
         env = IbisTestEnv()
-        hdfs_client = ibis.hdfs_connect(
+        hdfs_client = ibis.impala.hdfs_connect(
             host=env.nn_host,
             port=env.webhdfs_port,
             auth_mechanism=env.auth_mechanism,
Repository: ibis-project/ibis

Issue:
BigQuery: cast to `dt.binary` results in invalid datatype in compiled SQL
It appears that casting to `ibis.expr.datatypes.binary` results in `BINARY` as the data type. The correct [name for this data type in BigQuery is `BYTES`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#bytes_type)

**Code example**

```python
import ibis.bigquery
import ibis.expr.datatypes as dt

bigquery_client = ibis.bigquery.connect()
tbl = bigquery_client.table(
    "citibike_trips",
    database="bigquery-public-data.new_york_citibike"
)
expr = tbl[
    tbl["start_station_name"]
    .cast(dt.binary)
    .name("station_hash")
]
sql = expr.compile()
print(sql)
```

**Output**

```sql
SELECT CAST(`start_station_name` AS BINARY) AS `station_hash`
FROM `bigquery-public-data.new_york_citibike.citibike_trips`
```

This results in a `Type not found: BINARY at [1:48]` error when you paste this query in the BigQuery UI.


Discussion:

Resolving patch:
diff --git a/ibis/backends/bigquery/datatypes.py b/ibis/backends/bigquery/datatypes.py
--- a/ibis/backends/bigquery/datatypes.py
+++ b/ibis/backends/bigquery/datatypes.py
@@ -49,6 +49,11 @@ def trans_integer(t, context):
     return 'INT64'
 
 
+@ibis_type_to_bigquery_type.register(dt.Binary, TypeTranslationContext)
+def trans_binary(t, context):
+    return 'BYTES'
+
+
 @ibis_type_to_bigquery_type.register(
     dt.UInt64, (TypeTranslationContext, UDFContext)
 )


Test patch:
diff --git a/ibis/backends/bigquery/tests/test_compiler.py b/ibis/backends/bigquery/tests/test_compiler.py
--- a/ibis/backends/bigquery/tests/test_compiler.py
+++ b/ibis/backends/bigquery/tests/test_compiler.py
@@ -548,6 +548,16 @@ def test_now():
     assert result == expected
 
 
+def test_binary():
+    t = ibis.table([('value', 'double')], name='t')
+    expr = t["value"].cast(dt.binary).name("value_hash")
+    result = ibis.bigquery.compile(expr)
+    expected = """\
+SELECT CAST(`value` AS BYTES) AS `tmp`
+FROM t"""
+    assert result == expected
+
+
 def test_bucket():
     t = ibis.table([('value', 'double')], name='t')
     buckets = [0, 1, 3]