Skip to content

Fix: convert lists, ndarrays to tuples when sorting unit test dataframes#2296

Merged
georgesittas merged 3 commits intomainfrom
jo/fix_test
Mar 18, 2024
Merged

Fix: convert lists, ndarrays to tuples when sorting unit test dataframes#2296
georgesittas merged 3 commits intomainfrom
jo/fix_test

Conversation

@georgesittas
Copy link
Copy Markdown
Collaborator

@georgesittas georgesittas commented Mar 18, 2024

This was an oversight which probably surfaced with a delay, hopefully this fixes the CI in main.

See comment below.

@georgesittas georgesittas requested a review from a team March 18, 2024 17:47
@georgesittas georgesittas enabled auto-merge (squash) March 18, 2024 17:53
@georgesittas georgesittas disabled auto-merge March 18, 2024 17:54
@georgesittas georgesittas changed the title Fix: apply _to_hashable correctly in unit tests Fix: convert lists, ndarrays to tuples when sorting unit test dataframes Mar 18, 2024
@georgesittas georgesittas requested a review from a team March 18, 2024 19:04
@georgesittas
Copy link
Copy Markdown
Collaborator Author

georgesittas commented Mar 18, 2024

DuckDB recently bumped to 0.10.1 which included a commit that changed the dataframe list representation to be np.ndarray instead of python's list, so the instance check in _to_hashable broke.

The workaround here was to check for both lists and np.ndarrays and convert them to tuples. The other case where non-hashables are stringified was implemented in anticipation of dictionary support in unit tests.

@georgesittas georgesittas merged commit 840396e into main Mar 18, 2024
@georgesittas georgesittas deleted the jo/fix_test branch March 18, 2024 19:13
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