You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypedSet are wildly used in Presto in map functions and functions with set semantics. However, use of TypedSet is sub-optimal as it has to copy the data.
Similar to Proposal 2, but more flexible in the sense TypedSet doesn't have to hold every element in the provided block. This can be done via generalizing JsonUtil#HashTable.
Proposal 1 doesn't seem to work in every case because:
Presto scalar function can use a cached PageBuilder to avoid creating new BlockBuilder in each invocation.
For use case in map functions, we often require to insert into a provided block (e.g. a SingleMapBlockWriter created via beginBlockEntry()
Proposal 2 also doesn't work with the use case in map functions, as we only want to insert entry 0, 2, 4, ... into the Set.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had any activity in the last 2 years. If you feel that this issue is important, just comment and the stale tag will be removed; otherwise it will be closed in 7 days. This is an attempt to ensure that our open issues remain valuable and relevant so that we can keep track of what needs to be done and prioritize the right things.
TypedSet are wildly used in Presto in map functions and functions with set semantics. However, use of TypedSet is sub-optimal as it has to copy the data.
There are three proposals:
TypeSet.getBlock
to allow extract data (proposed in Optimize ARRAY_UNION #12029)TypedSet
doesn't have to hold every element in the provided block. This can be done via generalizingJsonUtil#HashTable
.Proposal 1 doesn't seem to work in every case because:
SingleMapBlockWriter
created viabeginBlockEntry()
Proposal 2 also doesn't work with the use case in map functions, as we only want to insert entry 0, 2, 4, ... into the
Set
.The text was updated successfully, but these errors were encountered: