databend
databend copied to clipboard
feat(planner): support tuple map access pushdown to storage
I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/
Summary
Use map access syntax to select tuple inner columns and push down the query to the storage layer, only need to read the required columns.
-
ColumnEntry
add fieldpath_indices
as an index to find inner columns. - add tuple inner columns to
Metadata
. - modify the
Extras
fieldprojection
asenum Projection
in order to access inner columns.
for example
CREATE TABLE t(id Int, t Tuple(a Tuple(m Int64, n Int64), b Tuple(x Int64, y Int64))) Engine = Fuse;
INSERT INTO t (id, t) VALUES(1, ((10, 11), (20, 21))), (2, ((30, 31), (40, 41)));
SELECT t:a:m, t:a:n, t:b[0], t:b[1] FROM t;
+-------+-------+--------+--------+
| t:a:m | t:a:n | t:b[0] | t:b[1] |
+-------+-------+--------+--------+
| 10 | 11 | 20 | 21 |
| 30 | 31 | 40 | 41 |
+-------+-------+--------+--------+
Fixes #6794
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
databend | ✅ Ready (Inspect) | Visit Preview | Aug 12, 2022 at 2:54PM (UTC) |
@mergify update
update