ibis-project / ibis-bigquery

BigQuery backend for Ibis
Apache License 2.0
19 stars 18 forks source link

approx methods failing with ibis master branch #141

Closed tswast closed 2 years ago

tswast commented 2 years ago

Looks like the APPROX_COUNT_DISTINCT and APPROX_QUANTILES methods aren't correctly compiling for some reason.

https://github.com/ibis-project/ibis-bigquery/runs/6923895834?check_suite_focus=true

_____________________________ test_column_summary ______________________________
alltypes = BigQueryTable: ibis-gbq.ibis_gbq_testing.functional_alltypes
  index           int64
  Unnamed_0       int64
  id     ..._string_col string
  string_col      string
  timestamp_col   timestamp
  year            int64
  month           int64
    def test_column_summary(alltypes):
        bool_col_summary = alltypes.bool_col.summary()
        expr = alltypes.aggregate(bool_col_summary)
>       result = expr.execute()
ibis_bigquery/tests/system/test_client.py:732: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.local/lib/python3.8/site-packages/ibis/expr/types/core.py:265: in execute
    return self._find_backend().execute(
../../../.local/lib/python3.8/site-packages/ibis_bigquery/__init__.py:295: in execute
    cursor = self.raw_sql(sql, params=params, **kwargs)
../../../.local/lib/python3.8/site-packages/ibis_bigquery/__init__.py:252: in raw_sql
    return self._execute(query, results=results, query_parameters=query_parameters)
../../../.local/lib/python3.8/site-packages/ibis_bigquery/__init__.py:[22](https://github.com/ibis-project/ibis-bigquery/runs/6923895834?check_suite_focus=true#step:8:23)8: in _execute
    query.result()  # blocks until finished
../../../.local/lib/python3.8/site-packages/google/cloud/bigquery/job/query.py:1499: in result
    do_get_result()
../../../.local/lib/python3.8/site-packages/google/api_core/retry.py:283: in retry_wrapped_func
    return retry_target(
../../../.local/lib/python3.8/site-packages/google/api_core/retry.py:190: in retry_target
    return target()
../../../.local/lib/python3.8/site-packages/google/cloud/bigquery/job/query.py:1489: in do_get_result
    super(QueryJob, self).result(retry=retry, timeout=timeout)
../../../.local/lib/python3.8/site-packages/google/cloud/bigquery/job/base.py:728: in result
    return super(_AsyncJob, self).result(timeout=timeout, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = QueryJob<project=ibis-gbq, location=US, id=ddbebae3-90a5-473d-900b-08457c5f0d1e>
timeout = None, retry = <google.api_core.retry.Retry object at 0x7f1574f87fa0>
    def result(self, timeout=None, retry=DEFAULT_RETRY):
        """Get the result of the operation, blocking if necessary.
        Args:
            timeout (int):
                How long (in seconds) to wait for the operation to complete.
                If None, wait indefinitely.
        Returns:
            google.protobuf.Message: The Operation's result.
        Raises:
            google.api_core.GoogleAPICallError: If the operation errors or if
                the timeout is reached before the operation completes.
        """
        kwargs = {} if retry is DEFAULT_RETRY else {"retry": retry}
        self._blocking_poll(timeout=timeout, **kwargs)
        if self._exception is not None:
            # pylint: disable=raising-bad-type
            # Pylint doesn't recognize that this is valid in this case.
>           raise self._exception
E           google.api_core.exceptions.BadRequest: 400 Function not found: ndv at [6:8]
E           
E           Location: US
E           Job ID: ddbebae3-90a5-473d-900b-08457c5f0d1e
../../../.local/lib/python3.8/site-packages/google/api_core/future/polling.py:137: BadRequest
______________________________ test_approx_median ______________________________
alltypes = BigQueryTable: ibis-gbq.ibis_gbq_testing.functional_alltypes
  index           int64
  Unnamed_0       int64
  id     ..._string_col string
  string_col      string
  timestamp_col   timestamp
  year            int64
  month           int64
    def test_approx_median(alltypes):
        m = alltypes.month
        expected = m.execute().median()
        assert expected == 7
        expr = m.approx_median()
>       result = expr.execute()
ibis_bigquery/tests/system/test_client.py:767: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.local/lib/python3.8/site-packages/ibis/expr/types/core.py:265: in execute
    return self._find_backend().execute(
../../../.local/lib/python3.8/site-packages/ibis_bigquery/__init__.py:295: in execute
    cursor = self.raw_sql(sql, params=params, **kwargs)
../../../.local/lib/python3.8/site-packages/ibis_bigquery/__init__.py:252: in raw_sql
    return self._execute(query, results=results, query_parameters=query_parameters)
../../../.local/lib/python3.8/site-packages/ibis_bigquery/__init__.py:228: in _execute
    query.result()  # blocks until finished
../../../.local/lib/python3.8/site-packages/google/cloud/bigquery/job/query.py:1499: in result
    do_get_result()
../../../.local/lib/python3.8/site-packages/google/api_core/retry.py:283: in retry_wrapped_func
    return retry_target(
../../../.local/lib/python3.8/site-packages/google/api_core/retry.py:190: in retry_target
    return target()
../../../.local/lib/python3.8/site-packages/google/cloud/bigquery/job/query.py:1489: in do_get_result
    super(QueryJob, self).result(retry=retry, timeout=timeout)
../../../.local/lib/python3.8/site-packages/google/cloud/bigquery/job/base.py:728: in result
    return super(_AsyncJob, self).result(timeout=timeout, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = QueryJob<project=ibis-gbq, location=US, id=e4ec16de-6701-44b1-a421-b1113dc66d1d>
timeout = None, retry = <google.api_core.retry.Retry object at 0x7f1574f87fa0>
    def result(self, timeout=None, retry=DEFAULT_RETRY):
        """Get the result of the operation, blocking if necessary.
        Args:
            timeout (int):
                How long (in seconds) to wait for the operation to complete.
                If None, wait indefinitely.
        Returns:
            google.protobuf.Message: The Operation's result.
        Raises:
            google.api_core.GoogleAPICallError: If the operation errors or if
                the timeout is reached before the operation completes.
        """
        kwargs = {} if retry is DEFAULT_RETRY else {"retry": retry}
        self._blocking_poll(timeout=timeout, **kwargs)
        if self._exception is not None:
            # pylint: disable=raising-bad-type
            # Pylint doesn't recognize that this is valid in this case.
>           raise self._exception
E           google.api_core.exceptions.BadRequest: 400 Function not found: appx_median at [1:8]
E           
E           Location: US
E           Job ID: e4ec16de-6701-44b1-a421-b1113dc66d1d
../../../.local/lib/python3.8/site-packages/google/api_core/future/polling.py:137: BadRequest
_____________________________ test_approx_nunique ______________________________
alltypes = BigQueryTable: ibis-gbq.ibis_gbq_testing.functional_alltypes
  index           int64
  Unnamed_0       int64
  id     ..._string_col string
  string_col      string
  timestamp_col   timestamp
  year            int64
  month           int64
project_id = 'ibis-gbq', dataset_id = 'ibis_gbq_testing'
    def test_approx_nunique(alltypes, project_id, dataset_id):
        d = alltypes.double_col
        expr = d.approx_nunique()
        result = expr.compile()
        expected = f"""\
    SELECT APPROX_COUNT_DISTINCT(`double_col`) AS `approx_nunique`
    FROM `{project_id}.{dataset_id}.functional_alltypes`"""
>       assert result == expected
E       AssertionError: assert 'SELECT ndv(`...nal_alltypes`' == 'SELECT APPRO...nal_alltypes`'
E         - SELECT APPROX_COUNT_DISTINCT(`double_col`) AS `approx_nunique`
E         ?        ^^^^^^^^^^^^^^^^^^^^^
E         + SELECT ndv(`double_col`) AS `approx_nunique`
E         ?        ^^^
E           FROM `ibis-gbq.ibis_gbq_testing.functional_alltypes`
ibis_bigquery/tests/system/test_compiler.py:273: AssertionError
______________________________ test_approx_median ______________________________
alltypes = BigQueryTable: ibis-gbq.ibis_gbq_testing.functional_alltypes
  index           int64
  Unnamed_0       int64
  id     ..._string_col string
  string_col      string
  timestamp_col   timestamp
  year            int64
  month           int64
project_id = 'ibis-gbq', dataset_id = 'ibis_gbq_testing'
    def test_approx_median(alltypes, project_id, dataset_id):
        d = alltypes.double_col
        expr = d.approx_median()
        result = expr.compile()
        expected = f"""\
    SELECT APPROX_QUANTILES(`double_col`, 2)[OFFSET(1)] AS `approx_median`
    FROM `{project_id}.{dataset_id}.functional_alltypes`"""
>       assert result == expected
E       AssertionError: assert 'SELECT appx_...nal_alltypes`' == 'SELECT APPRO...nal_alltypes`'
E         - SELECT APPROX_QUANTILES(`double_col`, 2)[OFFSET(1)] AS `approx_median`
E         + SELECT appx_median(`double_col`) AS `approx_median`
E           FROM `ibis-gbq.ibis_gbq_testing.functional_alltypes`
ibis_bigquery/tests/system/test_compiler.py:292: AssertionError
=============================== warnings summary ===============================
ibis_bigquery/tests/system/test_compiler.py:9
  /home/runner/work/ibis-bigquery/ibis-bigquery/ibis_bigquery/tests/system/test_compiler.py:9: PytestUnknownMarkWarning: Unknown pytest.mark.bigquery - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    pytestmark = pytest.mark.bigquery
ibis_bigquery/tests/system/test_connect.py:11
  /home/runner/work/ibis-bigquery/ibis-bigquery/ibis_bigquery/tests/system/test_connect.py:11: PytestUnknownMarkWarning: Unknown pytest.mark.bigquery - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    pytestmark = pytest.mark.bigquery
ibis_bigquery/tests/system/test_datatypes.py:12
  /home/runner/work/ibis-bigquery/ibis-bigquery/ibis_bigquery/tests/system/test_datatypes.py:12: PytestUnknownMarkWarning: Unknown pytest.mark.bigquery - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    pytestmark = pytest.mark.bigquery
tests/system/test_client.py: 13 warnings
tests/system/udf/test_udf_execute.py: 1 warning
  /home/runner/.local/lib/python3.8/site-packages/ibis/backends/pandas/client.py:[24](https://github.com/ibis-project/ibis-bigquery/runs/6923895834?check_suite_focus=true#step:8:25)7: FutureWarning: Using .astype to convert from timezone-aware dtype to timezone-naive dtype is deprecated and will raise in a future version.  Use obj.tz_localize(None) or obj.tz_convert('UTC').tz_localize(None) instead
    return column.astype(out_dtype.to_pandas(), errors='ignore')
tests/system/test_client.py::test_exists_table
tests/system/test_client.py::test_exists_table_different_project
tests/system/test_client.py::test_exists_table_different_project_fully_qualified
  /home/runner/.local/lib/python3.8/site-packages/ibis_bigquery/__init__.py:333: FutureWarning: `client.exists_table(name)` is deprecated, and will be removed in a future version of Ibis. Use `name in client.list_tables()` instead.
    warnings.warn(
tests/system/test_client.py::test_exists_database
tests/system/test_client.py::test_exists_database_different_project[bigquery-public-data.epa_historical_air_quality-True]
tests/system/test_client.py::test_exists_database_different_project[bigquery-foo-bar-project.baz_dataset-False]
  /home/runner/.local/lib/python3.8/site-packages/ibis_bigquery/__init__.py:310: FutureWarning: `client.exists_database(name)` is deprecated, and will be removed in a future version of Ibis. Use `name in client.list_databases()` instead.
    warnings.warn(
tests/system/test_client.py::test_exists_database
tests/system/test_client.py::test_exists_database
tests/system/test_client.py::test_exists_database_different_project[bigquery-public-data.epa_historical_air_quality-True]
tests/system/test_client.py::test_exists_database_different_project[bigquery-foo-bar-project.baz_dataset-False]
  /home/runner/.local/lib/python3.8/site-packages/ibis_bigquery/__init__.py:319: PendingDeprecationWarning: Client.dataset is deprecated and will be removed in a future version. Use a string like 'my_project.my_dataset' or a cloud.google.bigquery.DatasetReference object, instead.
    dataset_ref = client.dataset(dataset, project=project)
tests/system/test_client.py::test_cross_project_query
  /home/runner/work/ibis-bigquery/ibis-bigquery/ibis_bigquery/tests/system/test_client.py:559: DeprecationWarning: `np.object` is a deprecated alias for the builtin `object`. To silence this warning, use `object` by itself. Doing this will not modify any behavior and is safe. 
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    assert df.title.dtype == np.object
tests/system/test_client.py::test_cross_project_query
  /home/runner/work/ibis-bigquery/ibis-bigquery/ibis_bigquery/tests/system/test_client.py:560: DeprecationWarning: `np.object` is a deprecated alias for the builtin `object`. To silence this warning, use `object` by itself. Doing this will not modify any behavior and is safe. 
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    assert df.tags.dtype == np.object
tests/system/test_client.py::test_prevent_rewrite
  /home/runner/.local/lib/python3.8/site-packages/ibis/expr/types/core.py:187: FutureWarning: `prevent_rewrite` is deprecated as of v4.0; 
    return f(self, *args, **kwargs)
tests/system/udf/test_udf_execute.py: 14 warnings
  /home/runner/.local/lib/python3.8/site-packages/ibis_bigquery/udf/__init__.py:186: FutureWarning: `Argument` is deprecated as of v3.0; use Validator if needed
    name: Arg(rlz.value(type))
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED ibis_bigquery/tests/system/test_client.py::test_column_summary - googl...
FAILED ibis_bigquery/tests/system/test_client.py::test_approx_median - google...
FAILED ibis_bigquery/tests/system/test_compiler.py::test_approx_nunique - Ass...
FAILED ibis_bigquery/tests/system/test_compiler.py::test_approx_median - Asse...
= 4 failed, 131 passed, 13 xfailed, 1 xpassed, 44 warnings in 140.[25](https://github.com/ibis-project/ibis-bigquery/runs/6923895834?check_suite_focus=true#step:8:26)s (0:02:20) =_____________________________ test_column_summary ______________________________
alltypes = BigQueryTable: ibis-gbq.ibis_gbq_testing.functional_alltypes
  index           int64
  Unnamed_0       int64
  id     ..._string_col string
  string_col      string
  timestamp_col   timestamp
  year            int64
  month           int64
    def test_column_summary(alltypes):
        bool_col_summary = alltypes.bool_col.summary()
        expr = alltypes.aggregate(bool_col_summary)
>       result = expr.execute()
ibis_bigquery/tests/system/test_client.py:732: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.local/lib/python3.8/site-packages/ibis/expr/types/core.py:265: in execute
    return self._find_backend().execute(
../../../.local/lib/python3.8/site-packages/ibis_bigquery/__init__.py:295: in execute
    cursor = self.raw_sql(sql, params=params, **kwargs)
../../../.local/lib/python3.8/site-packages/ibis_bigquery/__init__.py:252: in raw_sql
    return self._execute(query, results=results, query_parameters=query_parameters)
../../../.local/lib/python3.8/site-packages/ibis_bigquery/__init__.py:[22](https://github.com/ibis-project/ibis-bigquery/runs/6923895834?check_suite_focus=true#step:8:23)8: in _execute
    query.result()  # blocks until finished
../../../.local/lib/python3.8/site-packages/google/cloud/bigquery/job/query.py:1499: in result
    do_get_result()
../../../.local/lib/python3.8/site-packages/google/api_core/retry.py:283: in retry_wrapped_func
    return retry_target(
../../../.local/lib/python3.8/site-packages/google/api_core/retry.py:190: in retry_target
    return target()
../../../.local/lib/python3.8/site-packages/google/cloud/bigquery/job/query.py:1489: in do_get_result
    super(QueryJob, self).result(retry=retry, timeout=timeout)
../../../.local/lib/python3.8/site-packages/google/cloud/bigquery/job/base.py:728: in result
    return super(_AsyncJob, self).result(timeout=timeout, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = QueryJob<project=ibis-gbq, location=US, id=ddbebae3-90a5-473d-900b-08457c5f0d1e>
timeout = None, retry = <google.api_core.retry.Retry object at 0x7f1574f87fa0>
    def result(self, timeout=None, retry=DEFAULT_RETRY):
        """Get the result of the operation, blocking if necessary.
        Args:
            timeout (int):
                How long (in seconds) to wait for the operation to complete.
                If None, wait indefinitely.
        Returns:
            google.protobuf.Message: The Operation's result.
        Raises:
            google.api_core.GoogleAPICallError: If the operation errors or if
                the timeout is reached before the operation completes.
        """
        kwargs = {} if retry is DEFAULT_RETRY else {"retry": retry}
        self._blocking_poll(timeout=timeout, **kwargs)
        if self._exception is not None:
            # pylint: disable=raising-bad-type
            # Pylint doesn't recognize that this is valid in this case.
>           raise self._exception
E           google.api_core.exceptions.BadRequest: 400 Function not found: ndv at [6:8]
E           
E           Location: US
E           Job ID: ddbebae3-90a5-473d-900b-08457c5f0d1e
../../../.local/lib/python3.8/site-packages/google/api_core/future/polling.py:137: BadRequest
______________________________ test_approx_median ______________________________
alltypes = BigQueryTable: ibis-gbq.ibis_gbq_testing.functional_alltypes
  index           int64
  Unnamed_0       int64
  id     ..._string_col string
  string_col      string
  timestamp_col   timestamp
  year            int64
  month           int64
    def test_approx_median(alltypes):
        m = alltypes.month
        expected = m.execute().median()
        assert expected == 7
        expr = m.approx_median()
>       result = expr.execute()
ibis_bigquery/tests/system/test_client.py:767: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.local/lib/python3.8/site-packages/ibis/expr/types/core.py:265: in execute
    return self._find_backend().execute(
../../../.local/lib/python3.8/site-packages/ibis_bigquery/__init__.py:295: in execute
    cursor = self.raw_sql(sql, params=params, **kwargs)
../../../.local/lib/python3.8/site-packages/ibis_bigquery/__init__.py:252: in raw_sql
    return self._execute(query, results=results, query_parameters=query_parameters)
../../../.local/lib/python3.8/site-packages/ibis_bigquery/__init__.py:228: in _execute
    query.result()  # blocks until finished
../../../.local/lib/python3.8/site-packages/google/cloud/bigquery/job/query.py:1499: in result
    do_get_result()
../../../.local/lib/python3.8/site-packages/google/api_core/retry.py:283: in retry_wrapped_func
    return retry_target(
../../../.local/lib/python3.8/site-packages/google/api_core/retry.py:190: in retry_target
    return target()
../../../.local/lib/python3.8/site-packages/google/cloud/bigquery/job/query.py:1489: in do_get_result
    super(QueryJob, self).result(retry=retry, timeout=timeout)
../../../.local/lib/python3.8/site-packages/google/cloud/bigquery/job/base.py:728: in result
    return super(_AsyncJob, self).result(timeout=timeout, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = QueryJob<project=ibis-gbq, location=US, id=e4ec16de-6701-44b1-a421-b1113dc66d1d>
timeout = None, retry = <google.api_core.retry.Retry object at 0x7f1574f87fa0>
    def result(self, timeout=None, retry=DEFAULT_RETRY):
        """Get the result of the operation, blocking if necessary.
        Args:
            timeout (int):
                How long (in seconds) to wait for the operation to complete.
                If None, wait indefinitely.
        Returns:
            google.protobuf.Message: The Operation's result.
        Raises:
            google.api_core.GoogleAPICallError: If the operation errors or if
                the timeout is reached before the operation completes.
        """
        kwargs = {} if retry is DEFAULT_RETRY else {"retry": retry}
        self._blocking_poll(timeout=timeout, **kwargs)
        if self._exception is not None:
            # pylint: disable=raising-bad-type
            # Pylint doesn't recognize that this is valid in this case.
>           raise self._exception
E           google.api_core.exceptions.BadRequest: 400 Function not found: appx_median at [1:8]
E           
E           Location: US
E           Job ID: e4ec16de-6701-44b1-a421-b1113dc66d1d
../../../.local/lib/python3.8/site-packages/google/api_core/future/polling.py:137: BadRequest
_____________________________ test_approx_nunique ______________________________
alltypes = BigQueryTable: ibis-gbq.ibis_gbq_testing.functional_alltypes
  index           int64
  Unnamed_0       int64
  id     ..._string_col string
  string_col      string
  timestamp_col   timestamp
  year            int64
  month           int64
project_id = 'ibis-gbq', dataset_id = 'ibis_gbq_testing'
    def test_approx_nunique(alltypes, project_id, dataset_id):
        d = alltypes.double_col
        expr = d.approx_nunique()
        result = expr.compile()
        expected = f"""\
    SELECT APPROX_COUNT_DISTINCT(`double_col`) AS `approx_nunique`
    FROM `{project_id}.{dataset_id}.functional_alltypes`"""
>       assert result == expected
E       AssertionError: assert 'SELECT ndv(`...nal_alltypes`' == 'SELECT APPRO...nal_alltypes`'
E         - SELECT APPROX_COUNT_DISTINCT(`double_col`) AS `approx_nunique`
E         ?        ^^^^^^^^^^^^^^^^^^^^^
E         + SELECT ndv(`double_col`) AS `approx_nunique`
E         ?        ^^^
E           FROM `ibis-gbq.ibis_gbq_testing.functional_alltypes`
ibis_bigquery/tests/system/test_compiler.py:273: AssertionError
______________________________ test_approx_median ______________________________
alltypes = BigQueryTable: ibis-gbq.ibis_gbq_testing.functional_alltypes
  index           int64
  Unnamed_0       int64
  id     ..._string_col string
  string_col      string
  timestamp_col   timestamp
  year            int64
  month           int64
project_id = 'ibis-gbq', dataset_id = 'ibis_gbq_testing'
    def test_approx_median(alltypes, project_id, dataset_id):
        d = alltypes.double_col
        expr = d.approx_median()
        result = expr.compile()
        expected = f"""\
    SELECT APPROX_QUANTILES(`double_col`, 2)[OFFSET(1)] AS `approx_median`
    FROM `{project_id}.{dataset_id}.functional_alltypes`"""
>       assert result == expected
E       AssertionError: assert 'SELECT appx_...nal_alltypes`' == 'SELECT APPRO...nal_alltypes`'
E         - SELECT APPROX_QUANTILES(`double_col`, 2)[OFFSET(1)] AS `approx_median`
E         + SELECT appx_median(`double_col`) AS `approx_median`
E           FROM `ibis-gbq.ibis_gbq_testing.functional_alltypes`
ibis_bigquery/tests/system/test_compiler.py:292: AssertionError
=============================== warnings summary ===============================
ibis_bigquery/tests/system/test_compiler.py:9
  /home/runner/work/ibis-bigquery/ibis-bigquery/ibis_bigquery/tests/system/test_compiler.py:9: PytestUnknownMarkWarning: Unknown pytest.mark.bigquery - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    pytestmark = pytest.mark.bigquery
ibis_bigquery/tests/system/test_connect.py:11
  /home/runner/work/ibis-bigquery/ibis-bigquery/ibis_bigquery/tests/system/test_connect.py:11: PytestUnknownMarkWarning: Unknown pytest.mark.bigquery - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    pytestmark = pytest.mark.bigquery
ibis_bigquery/tests/system/test_datatypes.py:12
  /home/runner/work/ibis-bigquery/ibis-bigquery/ibis_bigquery/tests/system/test_datatypes.py:12: PytestUnknownMarkWarning: Unknown pytest.mark.bigquery - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    pytestmark = pytest.mark.bigquery
tests/system/test_client.py: 13 warnings
tests/system/udf/test_udf_execute.py: 1 warning
  /home/runner/.local/lib/python3.8/site-packages/ibis/backends/pandas/client.py:[24](https://github.com/ibis-project/ibis-bigquery/runs/6923895834?check_suite_focus=true#step:8:25)7: FutureWarning: Using .astype to convert from timezone-aware dtype to timezone-naive dtype is deprecated and will raise in a future version.  Use obj.tz_localize(None) or obj.tz_convert('UTC').tz_localize(None) instead
    return column.astype(out_dtype.to_pandas(), errors='ignore')
tests/system/test_client.py::test_exists_table
tests/system/test_client.py::test_exists_table_different_project
tests/system/test_client.py::test_exists_table_different_project_fully_qualified
  /home/runner/.local/lib/python3.8/site-packages/ibis_bigquery/__init__.py:333: FutureWarning: `client.exists_table(name)` is deprecated, and will be removed in a future version of Ibis. Use `name in client.list_tables()` instead.
    warnings.warn(
tests/system/test_client.py::test_exists_database
tests/system/test_client.py::test_exists_database_different_project[bigquery-public-data.epa_historical_air_quality-True]
tests/system/test_client.py::test_exists_database_different_project[bigquery-foo-bar-project.baz_dataset-False]
  /home/runner/.local/lib/python3.8/site-packages/ibis_bigquery/__init__.py:310: FutureWarning: `client.exists_database(name)` is deprecated, and will be removed in a future version of Ibis. Use `name in client.list_databases()` instead.
    warnings.warn(
tests/system/test_client.py::test_exists_database
tests/system/test_client.py::test_exists_database
tests/system/test_client.py::test_exists_database_different_project[bigquery-public-data.epa_historical_air_quality-True]
tests/system/test_client.py::test_exists_database_different_project[bigquery-foo-bar-project.baz_dataset-False]
  /home/runner/.local/lib/python3.8/site-packages/ibis_bigquery/__init__.py:319: PendingDeprecationWarning: Client.dataset is deprecated and will be removed in a future version. Use a string like 'my_project.my_dataset' or a cloud.google.bigquery.DatasetReference object, instead.
    dataset_ref = client.dataset(dataset, project=project)
tests/system/test_client.py::test_cross_project_query
  /home/runner/work/ibis-bigquery/ibis-bigquery/ibis_bigquery/tests/system/test_client.py:559: DeprecationWarning: `np.object` is a deprecated alias for the builtin `object`. To silence this warning, use `object` by itself. Doing this will not modify any behavior and is safe. 
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    assert df.title.dtype == np.object
tests/system/test_client.py::test_cross_project_query
  /home/runner/work/ibis-bigquery/ibis-bigquery/ibis_bigquery/tests/system/test_client.py:560: DeprecationWarning: `np.object` is a deprecated alias for the builtin `object`. To silence this warning, use `object` by itself. Doing this will not modify any behavior and is safe. 
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    assert df.tags.dtype == np.object
tests/system/test_client.py::test_prevent_rewrite
  /home/runner/.local/lib/python3.8/site-packages/ibis/expr/types/core.py:187: FutureWarning: `prevent_rewrite` is deprecated as of v4.0; 
    return f(self, *args, **kwargs)
tests/system/udf/test_udf_execute.py: 14 warnings
  /home/runner/.local/lib/python3.8/site-packages/ibis_bigquery/udf/__init__.py:186: FutureWarning: `Argument` is deprecated as of v3.0; use Validator if needed
    name: Arg(rlz.value(type))
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED ibis_bigquery/tests/system/test_client.py::test_column_summary - googl...
FAILED ibis_bigquery/tests/system/test_client.py::test_approx_median - google...
FAILED ibis_bigquery/tests/system/test_compiler.py::test_approx_nunique - Ass...
FAILED ibis_bigquery/tests/system/test_compiler.py::test_approx_median - Asse...
= 4 failed, 131 passed, 13 xfailed, 1 xpassed, 44 warnings in 140.[25](https://github.com/ibis-project/ibis-bigquery/runs/6923895834?check_suite_focus=true#step:8:26)s (0:02:20) =
cpcloud commented 2 years ago

We changed the name of these ibis operations here https://github.com/ibis-project/ibis/commit/00c83e6912263d58cbf04d7904bc0e96ccb03af0, but we tried to do so in a backwards-compatible way. Looks like we may have not done so.

cpcloud commented 2 years ago

Ah, of course the API is producing the new objects and there's no translation rule here for those.

cpcloud commented 2 years ago

I can submit a PR.