lance-format/lance

Allow filtering of projected fields

Open

#2,971 建立於 2024年10月3日

在 GitHub 查看
 (4 留言) (1 反應) (0 負責人)Rust (695 fork)github user discovery
good first issue

倉庫指標

Star
 (6,582 star)
PR 合併指標
 (平均合併 6天 1小時) (30 天內合併 219 個 PR)

描述

Users can introduce new fields using projection. However, they cannot turn around and filter on these fields. This can perhaps wait until we have general SQL support but it could be implemented earlier.

The challenge is that we compile filters against the scan input schema and this does not contain the projected fields. We should compile the filter against the final projected schema. Then we can subtract fields that don't exist in the scan input schema and add a final FilterExec after the project.

This is a little bit tricky because, if we do the above directly, then the take step will try and take these fields and not find them. So we need to change the take logic slightly as well.

貢獻者指南