-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix session range comparision expression
- Loading branch information
Showing
9 changed files
with
92 additions
and
46 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
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
1 change: 1 addition & 0 deletions
1
tests/queries_ported/0_stateless/99004_session_with_range_comparision_bug.reference
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 @@ | ||
CREATE MATERIALIZED VIEW default.`99004_v`\n(\n `start` datetime64(3, \'UTC\'),\n `end` datetime64(3, \'UTC\'),\n `avg(speed)` float64,\n `_tp_time` datetime64(3, \'UTC\') DEFAULT now64(3, \'UTC\') CODEC(DoubleDelta, LZ4),\n INDEX _tp_time_index _tp_time TYPE minmax GRANULARITY 2\n) AS\nSELECT\n window_start AS start, window_end AS end, avg(speed)\nFROM\n session(default.`99004_speed`, 1m, [speed > 50,speed < 50))\nGROUP BY\n window_start, window_end |
19 changes: 19 additions & 0 deletions
19
tests/queries_ported/0_stateless/99004_session_with_range_comparision_bug.sql
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,19 @@ | ||
DROP VIEW IF EXISTS default.99004_v; | ||
|
||
DROP STREAM IF EXISTS default.99004_speed; | ||
|
||
CREATE STREAM default.99004_speed (speed float64); | ||
|
||
CREATE MATERIALIZED VIEW default.99004_v AS | ||
SELECT | ||
window_start AS start, window_end AS end, avg(speed) | ||
FROM | ||
session(default.99004_speed, 1m, [speed > 50,speed < 50)) | ||
GROUP BY | ||
window_start, window_end; | ||
|
||
SHOW CREATE default.99004_v; | ||
|
||
DROP VIEW default.99004_v; | ||
|
||
DROP STREAM default.99004_speed; |