TileDB-Py
TileDB-Py copied to clipboard
Return empty result for invalid enumeration
https://github.com/TileDB-Inc/TileDB-Py/issues/1880
Note that we already supported comparison operators on ordered enumerated values
As requested by @bkmartinjr
This pull request has been linked to Shortcut Story #38443: DataFrame: value filter on enum/dict column generates internal error.
This is also needs to be ported over to TileDB-SOMA-Py.
[sc-43002]
After discussing with @kounelisagis, we are just going to use this pre-existing PR to add the unit tests instead of opening a new one.
This pull request has been linked to Shortcut Story #43002: Add tests for QueryCondition against non-existent enum value.
Error comes from libtiledb. Should we address it there?
FAILED tiledb/tests/test_query_condition.py::QueryConditionTest::test_qc_enumeration - tiledb.cc.TileDBError: TileDB internal: Enumeration value not found for field 'attr2'
We need to wait for the libtiledb 2.21.0 release for this fix and then we can update setup.py. Although in the meantime we can test this against 2.21.0-rc2 to make sure CI is all passing.
@kounelisagis I'm so sorry, when I rebased against main and force pushed I accidentally removed your commits. Can you push your changes again?
It fails without 2.21 (or at least with 2.20...)
git checkout viviannguyen/sc-38443/dataframe-value-filter-on-enum-dict-column
pip install -r requirements_dev.txt
python setup.py develop
python -c "import tiledb; print(tiledb.libtiledb.version())"
(2, 21, 0)
pytest -o log_cli=true --log-cli-level=10 tiledb/tests/test_query_condition.py
Passes
git checkout dev setup.py
python setup.py develop
python -c "import tiledb; print(tiledb.libtiledb.version())"
(2, 20, 1)
pytest -o log_cli=true --log-cli-level=10 tiledb/tests/test_query_condition.py
Gives the following error: https://gist.github.com/kounelisagis/7c9d8803b24f92335b2c71d58bc7f9c8
Also tested it with 2.21.0 (not pre-release) and it works.
Thanks for doing the work of double checking @kounelisagis.
And also for reverting the libtiledb version in setup.py.