|
5 | 5 | import pyarrow as pa |
6 | 6 | import tiledb |
7 | 7 |
|
8 | | -import tiledbsoma.libtiledbsoma as clib |
9 | | - |
10 | 8 | from . import util, util_arrow, util_tiledb |
11 | 9 | from .logging import log_io |
12 | | -from .query_condition import QueryCondition |
13 | 10 | from .soma_collection import SOMACollectionBase |
14 | 11 | from .tiledb_array import TileDBArray |
15 | 12 | from .types import Ids, NTuple, SOMAResultOrder |
@@ -160,55 +157,6 @@ def is_indexed(self) -> Literal[False]: |
160 | 157 | def get_index_column_names(self) -> Sequence[str]: |
161 | 158 | return [] |
162 | 159 |
|
163 | | - def read_using_lib_temp( |
164 | | - self, |
165 | | - *, |
166 | | - # TODO: find the right syntax to get the typechecker to accept args like ``ids=slice(0,10)`` |
167 | | - # ids: Optional[Union[Sequence[int], Slice]] = None, |
168 | | - ids: Optional[Any] = None, |
169 | | - value_filter: Optional[str] = None, |
170 | | - column_names: Optional[Sequence[str]] = None, |
171 | | - result_order: Optional[str] = None, |
172 | | - # TODO: batch_size |
173 | | - # TODO: partition, |
174 | | - # TODO: platform_config, |
175 | | - ) -> Iterator[pa.Table]: |
176 | | - """ |
177 | | - TODO: copy the text |
178 | | - """ |
179 | | - |
180 | | - with self._tiledb_open("r") as A: |
181 | | - dim_names, attr_names = util_tiledb.split_column_names( |
182 | | - A.schema, column_names |
183 | | - ) |
184 | | - |
185 | | - query_condition = None |
186 | | - if value_filter is not None: |
187 | | - # query_condition = tiledb.QueryCondition(value_filter) |
188 | | - query_condition = QueryCondition(value_filter) |
189 | | - |
190 | | - # As an arg to this method, `column_names` is optional-None. For the pybind11 |
191 | | - # code it's optional-[]. |
192 | | - lib_column_names = [] if column_names is None else column_names |
193 | | - |
194 | | - sr = clib.SOMAReader( |
195 | | - self._uri, |
196 | | - name=self.name, |
197 | | - schema=A.schema, # query_condition needs this |
198 | | - column_names=lib_column_names, |
199 | | - query_condition=query_condition, |
200 | | - ) |
201 | | - |
202 | | - # TODO: platform_config |
203 | | - # TODO: batch_size |
204 | | - # TODO: result_order |
205 | | - |
206 | | - sr.submit() |
207 | | - |
208 | | - while arrow_table := sr.read_next(): |
209 | | - # yield util_arrow.ascii_to_unicode_pyarrow_readback(batch) |
210 | | - yield arrow_table # XXX what other post-processing |
211 | | - |
212 | 160 | def read( |
213 | 161 | self, |
214 | 162 | *, |
@@ -290,7 +238,7 @@ def read_all( |
290 | 238 | # TODO: platform_config, |
291 | 239 | ) -> pa.Table: |
292 | 240 | """ |
293 | | - This is a convenience method around ``read``. It iterates the return value from ``read`` and returns a concatenation of all the table-pieces found. Its nominal use is to simply unit-test cases. |
| 241 | + This is a convenience method around ``read``. It iterates the return value from ``read`` and returns a concatenation of all the table-pieces found. Its nominal use is to simplify unit-test cases. |
294 | 242 | """ |
295 | 243 | return pa.concat_tables( |
296 | 244 | self.read( |
|
0 commit comments