[query] Add vds.read_dense_mt to execute a single pass densify on read - #14877
Conversation
|
The current error |
|
Oh yay, it's cse. I'll take a look. |
|
I've got it reproducing locally. Will dig in tomorrow morning. I always need to use the debugger to figure out cse issues. |
3abb739 to
d50b180
Compare
Unlike `to_dense_mt`, this takes advantage of our knowledge of the max ref block length to do a densify in a single pass. Using `query_matrix_table_rows`, we can read max length more reference data ahead of the variant partition and use `_aggregate_scan` to perform the scan within the partition only. This removes the painful single node scan to acquire all of the starting dense rows that `to_dense_mt` must do.
We have ContainsAgg/ContainsScan, use them. Furthermore, StreamAggScan should simplify to a StreamMap, not the body of the scan, which can never have the same type as the StreamAggScan node, thus this rule was incorrect.
3132b9d to
ffc63f4
Compare
c105582 to
3cc717f
Compare
patrick-schultz
left a comment
There was a problem hiding this comment.
Very nicely done. Just a couple small questions.
| assert to_dense_mt_mt._same(read_dense_mt_mt) | ||
|
|
||
|
|
||
| def test_read_dense_mt(): |
There was a problem hiding this comment.
Is this testing anything not covered by the above equivalentce test?
|
|
||
| @typecheck(path=str, _intervals=nullable(sequenceof(anytype))) | ||
| def read_dense_mt(path, *, _intervals=None): | ||
| # FIXME: use _intervals |
There was a problem hiding this comment.
What is this referring to?
There was a problem hiding this comment.
Like the _intervals argument for reads. Reading the data with a specified partitioning. It's something I want to implements, but haven't yet.
There was a problem hiding this comment.
Ah, got it. Should we leave off the _intervals argument if it doesn't do anything yet?
|
@grohli poke |
grohli
left a comment
There was a problem hiding this comment.
Sorry about the delay on this--LGTM, thanks Chris!
Change Description
Add
read_dense_mt, a single pass vds densify method that reads a VDS as a dense matrix table. Usingquery_matrix_table_rows, we read the partitions of the variant data, alongside reading the reference data at the variant partition start lessref_block_max_len, making sure we have all the data that could produce a reference element for that partition.Part of #14499
Security Assessment
Delete all except the correct answer:
Impact Description
Query only