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
DaphneIR has a GroupOp for relational-style grouping and aggregation, plus a corresponding group-kernel. However, at the moment, this operation can only be created through DAPHNE's SQL parser, but not through DaphneDSL.
This task is to add a group() built-in function to DaphneDSL that creates a GroupOp in DaphneIR. The interface should be (following the notation used in the docs: group(arg:frame, groupCols:str, ..., sumCol:str). That is, the built-in function gets a frame, an arbitrary number of columns to group on, and a single column to calculate the sum on. While this interface does not allow to use all features of the GroupOp/group-kernel (e.g., multiple aggregates, other aggregate functions than sum), it would be a good first step and sufficient for implementing the Star Schema Benchmark in DaphneDSL. We can reflect the full functionality of the GroupOp is DaphneDSL later.
Hints:
Add the new built-in function in the DaphneDSL parser.
Add a few script-level test cases for the group built-in function.
group is a variadic built-in/op/kernel. See existing ops like createFrame for an example. E.g., have a look at how they are handled in src/parser/daphnedsl/DaphneDSLBuiltins.cpp.
For an example of how to create a GroupOp, see the SQL parser in src/parser/sql/SQLVisitor.cpp.
The text was updated successfully, but these errors were encountered:
- This built-in function creates a GroupOp in DaphneIR.
- Only support 'SUM' as an aggregation function.
- Get only one aggregation column.
- Get an arbitrary number of columns to group on.
- Add support for string values in the 'group' kernel function.
- SUM, MIN, and MAX are the only aggregation functions applied to string columns.
- Other aggregation functions throw an exception if they receive strings as arguments or results.
- Additionally, 'DeduceValueTypeAndExecute' cannot handle string values due to unsupported operations on strings.
- Therefore, 'ColumnGroupAggStringVTArg' that is specialized for strings is used.
- Or 'ColumnGroupAgg' is called exclusively with string values.
- The 'group' function internally calls the 'order' and 'extractCol' kernel functions.
- These two functions are updated to handle string values correctly.
- Added script-level test cases to validate the new functionality.
- Close issue daphne-eu#903
DaphneIR has a
GroupOp
for relational-style grouping and aggregation, plus a correspondinggroup
-kernel. However, at the moment, this operation can only be created through DAPHNE's SQL parser, but not through DaphneDSL.This task is to add a
group()
built-in function to DaphneDSL that creates aGroupOp
in DaphneIR. The interface should be (following the notation used in the docs:group(arg:frame, groupCols:str, ..., sumCol:str)
. That is, the built-in function gets a frame, an arbitrary number of columns to group on, and a single column to calculate the sum on. While this interface does not allow to use all features of theGroupOp
/group
-kernel (e.g., multiple aggregates, other aggregate functions than sum), it would be a good first step and sufficient for implementing the Star Schema Benchmark in DaphneDSL. We can reflect the full functionality of theGroupOp
is DaphneDSL later.Hints:
group
built-in function.group
is a variadic built-in/op/kernel. See existing ops likecreateFrame
for an example. E.g., have a look at how they are handled insrc/parser/daphnedsl/DaphneDSLBuiltins.cpp
.GroupOp
, see the SQL parser insrc/parser/sql/SQLVisitor.cpp
.The text was updated successfully, but these errors were encountered: