refactor to reduce functions complexity
For example, 

https://github.com/huggingface/datasets-preview-backend/blob/13e533238eb6b6dfdcd8e7d3c23ed134c67b5525/src/datasets_preview_backend/queries/rows.py#L25

is rightly flagged by https://sourcery.ai/ as too convoluted. It's hard to debug and test, and there are too many special cases.
refactor to reduce functions complexity: For example, 

https://github.com/huggingface/datasets-preview-backend/blob/13e533238eb6b6dfdcd8e7d3c23ed134c67b5525/src/datasets_preview_backend/queries/rows.py#L25

is rightly flagged by https://sourcery.ai/ as too convoluted. It's hard to debug and test, and there are too many special cases.