Skip to content
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

SQLParser: Introduce DISTINCT clause #564

Merged
merged 7 commits into from
Nov 16, 2023

Conversation

tomschw
Copy link
Contributor

@tomschw tomschw commented Jul 4, 2023

New feature:

  • Allow the use of DISTINCT clause in SQL statements to only return unique rows
  • Allow the aggregation word in SQL commands to be any type of lower/upper case

Changes:

  • Introduce DISTINCT in the SQLParser
  • Allow the use of the Group Kernel with "*" (group over all columns in the input frame) (not yet in SQL CLI)

Update:

@philipportner philipportner merged commit e6df569 into daphne-eu:main Nov 16, 2023
2 checks passed
@philipportner
Copy link
Collaborator

Thank you @tomschw for your contribution! LGTM, I merged your PR and I'll close the fixed issue.

pdamme added a commit that referenced this pull request Apr 8, 2024
…teToCallKernelOpPass.

- Some DaphneIR operations have variadic operands, i.e., operands which can occur an arbitrary number of times (including zero).
- When lowering DaphneIR operations to the DaphneIR CallKernelOp, this poses a problem as the C++ kernels cannot be pre-compiled for any number of operands.
- Thus, the kernels expect an array of operands (pointer plus size); in DaphneIR this is represented by a value of type daphne::VariadicPack, which stores all occurrences of a variadic operand.
- So RewriteToCallKernelOpPass needs to convert variadic operands of DaphneIR operations to DaphneIR's VariadicPack.
- In the past there have been problems in case of variadic operands with zero occurrences.
- As GroupOp was the only problematic op so far, a workaround has been provided in PRs #564 and #543.
- This commit improves the treatment of variadic operands with zero occurrences in RewriteToCallKernelOpPass:
  - First, the code is more general now and clearly expresses that this problem is not about GroupOp, but about instances of ops with variadic operands with zero occurrences, in general.
  - Second, the code for treating individual such ops is significantly simpler and more extensible now, since one only has to provide a default MLIR type for the variadic operand.
- Furthermore, a simplified version of the example DaphneDSL code mentioned in issue #562, that failed before PR #564, was added as a test case now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants