-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cover
Offset()
in aggregations with e2e tests (#42455)
* Add repro for 32323 * Fix offset not working in case * Make offset function return any * Add a repro for #42377 * Fix order of adjustments * Revert unrelated changes * Remove commented code * Revert unrelated changes * Refactor test * Type offset aggregation * Add a test for no order by or breakout clause * Add a basic test for breakout clause * Fix assertion * Remove problematic dependency * Fix uuids generation * Remove redundant limit * Add a test for multiple breakouts * Update test names * Extract OFFSET_SUM_TOTAL_AGGREGATION * Add a repro for #42509 * Add a test for multiple aggregations and breakouts * Remove unused intercept * Move uuid utils to separate file - it wasn't possible to import the utils file in e2e tests without it * Make isUuid a type guard * Add tests for sorting * Tag the test * Add extra assertion to verify expression parsing * Add a complex scenario * Reverse isFirst logic
- Loading branch information
1 parent
38d540a
commit f596f0b
Showing
9 changed files
with
413 additions
and
55 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,29 @@ | ||
export function uuid() { | ||
return ( | ||
s4() + | ||
s4() + | ||
"-" + | ||
s4() + | ||
"-" + | ||
s4() + | ||
"-" + | ||
s4() + | ||
"-" + | ||
s4() + | ||
s4() + | ||
s4() | ||
); | ||
} | ||
|
||
function s4() { | ||
return Math.floor((1 + Math.random()) * 0x10000) | ||
.toString(16) | ||
.substring(1); | ||
} | ||
|
||
export function isUuid(uuid: unknown): uuid is string { | ||
return ( | ||
typeof uuid === "string" && | ||
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(uuid) | ||
); | ||
} |
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
9 changes: 4 additions & 5 deletions
9
...sualizations/visualizations/SmartScalar/SettingsComponents/SmartScalarSettingsWidgets.tsx
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