Skip to content

Conversation

class BinaryViewArray(Array[scalar.BinaryViewScalar]): ...

class DictionaryArray(Array[scalar.DictionaryScalar[_IndexT, _BasicValueT]]):
def dictionary_encode(self) -> Self: ... # type: ignore[override]
Copy link
Contributor Author

@dangotbanned dangotbanned Apr 30, 2025

Choose a reason for hiding this comment

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

The override is part of the API

TypeError                                 Traceback (most recent call last)
Cell In[8], line 1
----> [1] dict_arr.dictionary_encode("encode")

TypeError: dictionary_encode() takes exactly 0 positional arguments (1 given)

Where Array accepts parameters and has a default https://arrow.apache.org/docs/python/generated/pyarrow.Array.html#pyarrow.Array.dictionary_encode

@zen-xu zen-xu merged commit 59bf9e0 into zen-xu:main May 9, 2025
2 checks passed
@dangotbanned dangotbanned deleted the fix-dictionary-array branch May 9, 2025 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants