Align APIs of Database and in-memory backends #5154
Labels
-libs
Libraries: New libraries to be implemented
l-types-and-statics
p-low
Low priority
x-chore
Type: chore
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 thenread
will have the functionality of ensuring the returned table is in-memory (so doing nothing if it was already).The text was updated successfully, but these errors were encountered: