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.

贡献者指南