-
Notifications
You must be signed in to change notification settings - Fork 606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YQL-16402: Implement key cache for Top and TopSort nodes #4761
YQL-16402: Implement key cache for Top and TopSort nodes #4761
Conversation
⚪
|
⚪
|
229df8b
to
38dd5da
Compare
⚪
|
⚪
|
38dd5da
to
b08dbd6
Compare
⚪
|
⚪
|
b08dbd6
to
ceecfe7
Compare
⚪
|
⚪
|
This patch fixes the issue with the excess calculations of the sorting keys for TopSort computation node. While compiling TopSort runtime node, the input source (either stream or flow) is transformed into {key: item} mapping, and the resulting iterable is processed by both KeepTop and TopSort nodes using the trivial key extractor, that obtains the key value as the first component from the item of the resulting iterable. The result yielded by TopSort is transformed back returning only the second component from the item of the mapping being processed. As a result of the changed described above, <keyExtractor> callable is invoked once for each item of the given input iterable. A static UDF module is used to test the fix. It provides an echo function, that increments TLS counter each time being called. When the processing is finished, the value of this counter is compared with the number of the items in the Stream/Flow.
This patch fixes the issue with the excess calculations of the sorting keys for Top computation node. While compiling Top runtime node, the input source (either stream or flow) is transformed into {key: item} mapping, and the resulting iterable is processed by both KeepTop and Top nodes using the trivial key extractor, that obtains the key value as the first component from the item of the resulting iterable. The result yielded by Top is transformed back returning only the second component from the item of the mapping being processed. As a result of the changed described above, <keyExtractor> callable is invoked once for each item of the given input iterable. A static UDF module is used to test the fix. It provides an echo function, that increments TLS counter each time being called. When the processing is finished, the value of this counter is compared with the number of the items in the Stream/Flow.
ceecfe7
to
43b854b
Compare
⚪
|
⚪
|
This patchset fixes the issue with the excess calculations of the sorting keys for
Top
/TopSort
computation node. While compilingTop
/TopSort
runtime node, the input source (either stream or flow) is transformed into{key: item}
mapping, and the resulting iterable is processed by bothKeepTop
andTop
/TopSort
nodes using the trivial key extractor, that obtains the key value as the first component from the item of the resulting iterable. The result yielded byTop
/TopSort
is transformed back returning only the second component from the item of the mapping being processed.As a result of the changed described above,
<keyExtractor>
callable is invoked once for each item of the given input iterable.A static UDF module is used to test the fix. It provides an echo function, that increments TLS counter each time being called. When the processing is finished, the value of this counter is compared with the number of the items in the Stream/Flow.
Changelog category