feat(python,js): deletion operation on remote tables (#568)

This commit is contained in:
Lei Xu
2023-10-14 15:47:19 -07:00
committed by GitHub
parent 6d66404506
commit fe64fc4671
2 changed files with 6 additions and 2 deletions

View File

@@ -157,6 +157,6 @@ export class RemoteTable<T = number[]> implements Table<T> {
}
async delete (filter: string): Promise<void> {
throw new Error('Not implemented')
await this._client.post(`/v1/table/${this._name}/delete/`, { predicate: filter })
}
}

View File

@@ -105,4 +105,8 @@ class RemoteTable(Table):
return self._conn._loop.run_until_complete(result).to_arrow()
def delete(self, predicate: str):
raise NotImplementedError
"""Delete rows from the table."""
payload = {"predicate": predicate}
self._conn._loop.run_until_complete(
self._conn._client.post(f"/v1/table/{self._name}/delete/", data=payload)
)