Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Provide 'shared' implementations for count and sum functions #479

Merged
merged 1 commit into from
May 12, 2023

Conversation

kurapov-peter
Copy link
Contributor

Fixes these tests:

  • Select.FilterAndSimpleAggregation
  • Select.FilterAndGroupByMultipleAgg
  • Select.GroupByPushDownFilterIntoExprRange
  • Select.WatchdogTest

Those functions will have the _shared prefix once we enable the shared memory path.
A couple of notes:

  1. I took a look into generating those functions by macros (specifically with m4), but it seems to me that typing them is less effort because of the subtle differences in the IR (mostly types casting).
  2. Not all the platforms support atomics for, say, add i64, but I left it as is for now.
  3. There's still at least one case that produces an incorrect result: SELECT AVG(CAST(x AS FLOAT)) FROM test GROUP BY y;

@kurapov-peter kurapov-peter merged commit 9d4cd19 into main May 12, 2023
@kurapov-peter kurapov-peter deleted the pakurapo/shared-aggs branch May 12, 2023 18:43
@lmontigny
Copy link
Contributor

lmontigny commented May 15, 2023

Working on the SLM, I had to redefine in genx.ll the following methods as well:
agg_min_double_skip_val
agg_max_float_skip_val
write_projection_int32
write_projection_int64

it has issue with the addrspace(4) casting as with agg_sum_double_skip_val previously.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants