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

GROUP BY support #24

Open
2 of 3 tasks
Samyak2 opened this issue Jan 24, 2023 · 0 comments · May be fixed by #26
Open
2 of 3 tasks

GROUP BY support #24

Samyak2 opened this issue Jan 24, 2023 · 0 comments · May be fixed by #26

Comments

@Samyak2
Copy link
Collaborator

Samyak2 commented Jan 24, 2023

Overview

This is a tracking issue for adding support for the GROUP BY clause of a SELECT statement. This allows aggregations over unique values of a column.

Tasks

  • add instructions for GROUP BY and aggregations
    • See the GroupBy instruction
    • Aggregations are defined in the expr for Project or Filter just like normal non-grouped aggregations
    • Note: this is most likely subject to change
  • add GROUP BY codegen to the generic dialect
  • evaluating GroupBy instructions and aggregations
    • from How should aggregate work in the VM #16, we saw that
      • GroupBy should probably have input and output registers like Project
      • we need a different table with an efficient index implementation to look up the grouped columns
      • the HAVING clause can re-use aggregations that are already computed and it might be difficult to perform common sub-expression elimination here
@Samyak2 Samyak2 linked a pull request Feb 21, 2023 that will close this issue
6 tasks
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 a pull request may close this issue.

1 participant