test/command/suite/select/function/time/time_classify_year/interval.test
raw| 1 | plugin_register functions/time |
| 2 | |
| 3 | table_create Timestamps TABLE_PAT_KEY Time |
| 4 | |
| 5 | load --table Timestamps |
| 6 | [ |
| 7 | {"_key": "2015-12-31 23:59:59.999999"}, |
| 8 | {"_key": "2016-01-01 00:00:00.000000"}, |
| 9 | {"_key": "2016-01-01 00:00:00.000001"}, |
| 10 | {"_key": "2017-12-31 23:59:59.999999"}, |
| 11 | {"_key": "2018-01-01 00:00:00.000000"}, |
| 12 | {"_key": "2018-01-01 00:00:00.000001"} |
| 13 | ] |
| 14 | |
| 15 | select Timestamps \ |
| 16 | --sortby _id \ |
| 17 | --limit -1 \ |
| 18 | --output_columns '_key, time_classify_year(_key, 2)' |