Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

bug: substr fails to compile (#94) #95

Merged
merged 5 commits into from
Nov 23, 2021
Merged

Conversation

seibs
Copy link
Contributor

@seibs seibs commented Nov 22, 2021

Closes #94.

@tswast tswast changed the base branch from main to v1 November 22, 2021 22:25
@tswast tswast added the run-ci Code has been reviewed and is deemed safe to run label Nov 22, 2021
@tswast
Copy link
Collaborator

tswast commented Nov 22, 2021

Getting a test failure:

_____________________________ test_boolean_casting _____________________________

alltypes = BigQueryTable[table]
  name: ibis-gbq.testing.functional_alltypes
  schema:
    index : int64
    Unnamed_0 : int64
  ...4
    date_string_col : string
    string_col : string
    timestamp_col : timestamp
    year : int64
    month : int64

    def test_boolean_casting(alltypes):
        t = alltypes
        expr = t.groupby(k=t.string_col.nullif("1") == "9").count()
        result = expr.execute().set_index("k")
        count = result["count"]
>       assert count.loc[False] == 5840

tests/system/test_client.py:714: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.local/lib/python3.8/site-packages/pandas/core/indexing.py:931: in __getitem__
    return self._getitem_axis(maybe_callable, axis=axis)
../../../.local/lib/python3.8/site-packages/pandas/core/indexing.py:1163: in _getitem_axis
    self._validate_key(key, axis)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pandas.core.indexing._LocIndexer object at 0x7fc302f73c70>, key = False
axis = 0

    @doc(_LocationIndexer._validate_key)
    def _validate_key(self, key, axis: int):
        # valid for a collection of labels (we check their presence later)
        # slice of labels (where start-end in labels)
        # slice of integers (only if in the labels)
        # boolean not in slice and with boolean index
        if isinstance(key, bool) and not is_bool_dtype(self.obj.index):
>           raise KeyError(
                f"{key}: boolean label can not be used without a boolean index"
            )
E           KeyError: 'False: boolean label can not be used without a boolean index'

../../../.local/lib/python3.8/site-packages/pandas/core/indexing.py:972: KeyError
=============================== warnings summary ===============================

Not 100% sure if it's related.

@tswast
Copy link
Collaborator

tswast commented Nov 22, 2021

I think it's just a breaking change in pandas. Probably need to update that test.

@seibs
Copy link
Contributor Author

seibs commented Nov 23, 2021

I'm also seeing this error in the CI output. Locally I ran against Ibis 1.2, but looks like maybe the CI is running against 2.0?

ibis_bigquery/client.py:24: in <module>
12
    from ibis.client import Database, Query, SQLClient
13
E   ModuleNotFoundError: No module named 'ibis.client'
14
Error: Process completed with exit code 4.

@tswast tswast added run-ci Code has been reviewed and is deemed safe to run and removed run-ci Code has been reviewed and is deemed safe to run labels Nov 23, 2021
Copy link
Collaborator

@tswast tswast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@github-actions github-actions bot removed the run-ci Code has been reviewed and is deemed safe to run label Nov 23, 2021
@tswast tswast added the run-ci Code has been reviewed and is deemed safe to run label Nov 23, 2021
@tswast tswast added run-ci Code has been reviewed and is deemed safe to run and removed run-ci Code has been reviewed and is deemed safe to run labels Nov 23, 2021
@github-actions github-actions bot removed the run-ci Code has been reviewed and is deemed safe to run label Nov 23, 2021
@tswast tswast added the run-ci Code has been reviewed and is deemed safe to run label Nov 23, 2021
@github-actions github-actions bot removed the run-ci Code has been reviewed and is deemed safe to run label Nov 23, 2021
@tswast
Copy link
Collaborator

tswast commented Nov 23, 2021

I'm also seeing this error in the CI output. Locally I ran against Ibis 1.2, but looks like maybe the CI is running against 2.0?

That's correct. I've just updated it to only run against 1.x on the v1 branch. Work is still in progress to support Ibis 2.x.

@tswast tswast merged commit b86e585 into ibis-project:v1 Nov 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

substr fails to compile
2 participants