Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
143 additions
and
0 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
63 changes: 63 additions & 0 deletions
63
test/command/suite/select/function/time/time_classify_day_of_the_week/valid.expected
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,63 @@ | ||
| plugin_register functions/time | ||
| [[0,0.0,0.0],true] | ||
| table_create Timestamps TABLE_PAT_KEY Time | ||
| [[0,0.0,0.0],true] | ||
| load --table Timestamps | ||
| [ | ||
| {"_key": "2016-05-06 00:00:00.000001"}, | ||
| {"_key": "2016-05-06 23:59:59.999999"}, | ||
| {"_key": "2016-05-07 00:00:00.000000"}, | ||
| {"_key": "2016-05-07 00:00:00.000001"}, | ||
| {"_key": "2016-05-08 23:59:59.999999"}, | ||
| {"_key": "2016-05-08 00:00:00.000000"} | ||
| ] | ||
| [[0,0.0,0.0],6] | ||
| select Timestamps --sortby _id --limit -1 --output_columns '_key, time_classify_day_of_the_week(_key)' | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 6 | ||
| ], | ||
| [ | ||
| [ | ||
| "_key", | ||
| "Time" | ||
| ], | ||
| [ | ||
| "time_classify_day_of_the_week", | ||
| null | ||
| ] | ||
| ], | ||
| [ | ||
| 1462460400.000001, | ||
| 5 | ||
| ], | ||
| [ | ||
| 1462546799.999999, | ||
| 5 | ||
| ], | ||
| [ | ||
| 1462546800.0, | ||
| 6 | ||
| ], | ||
| [ | ||
| 1462546800.000001, | ||
| 6 | ||
| ], | ||
| [ | ||
| 1462719599.999999, | ||
| 0 | ||
| ], | ||
| [ | ||
| 1462633200.0, | ||
| 0 | ||
| ] | ||
| ] | ||
| ] | ||
| ] |
18 changes: 18 additions & 0 deletions
18
test/command/suite/select/function/time/time_classify_day_of_the_week/valid.test
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,18 @@ | ||
| plugin_register functions/time | ||
|
|
||
| table_create Timestamps TABLE_PAT_KEY Time | ||
|
|
||
| load --table Timestamps | ||
| [ | ||
| {"_key": "2016-05-06 00:00:00.000001"}, | ||
| {"_key": "2016-05-06 23:59:59.999999"}, | ||
| {"_key": "2016-05-07 00:00:00.000000"}, | ||
| {"_key": "2016-05-07 00:00:00.000001"}, | ||
| {"_key": "2016-05-08 23:59:59.999999"}, | ||
| {"_key": "2016-05-08 00:00:00.000000"} | ||
| ] | ||
|
|
||
| select Timestamps \ | ||
| --sortby _id \ | ||
| --limit -1 \ | ||
| --output_columns '_key, time_classify_day_of_the_week(_key)' |