Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align APIs of Database and in-memory backends #5154

Open
wdanilo opened this issue Feb 5, 2023 · 0 comments
Open

Align APIs of Database and in-memory backends #5154

wdanilo opened this issue Feb 5, 2023 · 0 comments
Labels
-libs Libraries: New libraries to be implemented l-types-and-statics p-low Low priority x-chore Type: chore

Comments

@wdanilo
Copy link
Member

wdanilo commented Feb 5, 2023

This task is automatically imported from the old Task Issue Board and it was originally created by Radosław Waśko.
Original issue is here.


We have some methods that are defined only on Database or In-memory Column/Table.

There are some methods which only make sense on one of them, but such API disparity will confuse users - as switching backends will lead to method resolution errors which is not quite expected.

We should align the APIs, possibly just throwing Unsupported_Database_Operation_Error_Data for stuff that cannot be done in the Database backend without materializing - such an error is much clearer than the method resolution error.

I'm not sure how to handle Table.read - it doesn't make much sense to exist on the in-memory table, but maybe for compatibility it should just work as identity? i.e. Table.read self = self. This way switching to in-memory backend from Database won't break workflows that were materializing in some places. IMO it makes sense as then read will have the functionality of ensuring the returned table is in-memory (so doing nothing if it was already).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-libs Libraries: New libraries to be implemented l-types-and-statics p-low Low priority x-chore Type: chore
Projects
None yet
Development

No branches or pull requests

2 participants