Karol Sobczak
Karol Sobczak
> So my take is that materialized views as they work now aren't really usable for anything with "layers". What do you think it will take to make MVs more...
Initial branch https://github.com/starburstdata/trino/tree/ks/rollup
Alternatively, we should just skip buffering there and just rely on `OutputStreamSliceOutput` (which is accounted for and already does buffering) to do buffering instead. cc @electrum @losipiuk @linzebing
See Slack discussion for context https://trinodb.slack.com/archives/CGB0QHWSW/p1662502274619329?thread_ts=1662298857.240529&cid=CGB0QHWSW
> We can work around that by adding to airlift the MemoryAware interface which exposes the getRetainedSize method. The we can make the TrinoS3StreamingOutputStream implement that interface. I think `OutputStreams`...
I don't think it's a duplicate. Improving memory efficiency, fixing leaks != accounting for memory
Yet another option is to pass query context in a static way. We already wrap `FileSystem` calls with `doAs`. Maybe we could pass memory context in same way.
cc @lukasz-stec
> I believe partial aggregation supports MarkDistinct too It does, but the problem is when you have multiple distinct aggregations, e.g: `aggr(distinct a), aggr(distinct b), ..`. Then for each you...
cc @lukasz-stec