-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add 'group()' built-in function to DaphneDSL.
- 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 #903
- Loading branch information
1 parent
e80a5e6
commit 02dd2cf
Showing
7 changed files
with
157 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// constant folding of casts between unsigned, signed, signless types | ||
|
||
fr = createFrame([ "String1", "String1", "String2", "String3", "String3" ], [ 1, 1, 2, 3, 4 ], | ||
[ 100, 200, 300, 400, 500 ], "a", "b", "c"); | ||
|
||
res = group(fr, "c", "a", "b"); | ||
|
||
print(res); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Frame(4x3, [a:std::string, b:int64_t, SUM(c):int64_t]) | ||
String1 1 300 | ||
String2 2 300 | ||
String3 3 400 | ||
String3 4 500 |