Mingyu Chen
af1beb6ce4
[Enhance] Add prepare phase for some timestamp functions ( #3947 )
...
Fix : #3946
CL:
1. Add prepare phase for `from_unixtime()`, `date_format()` and `convert_tz()` functions, to handle the format string once for all.
2. Find the cctz timezone when init `runtime state`, so that don't need to find timezone for each rows.
3. Add constant rewrite rule for `utc_timestamp()`
4. Add doc for `to_date()`
5. Comment out the `push_handler_test`, it can not run in DEBUG mode, will be fixed later.
6. Remove `timezone_db.h/cpp` and add `timezone_utils.h/cpp`
The performance shows bellow:
11,000,000 rows
SQL1: `select count(from_unixtime(k1)) from tbl1;`
Before: 8.85s
After: 2.85s
SQL2: `select count(from_unixtime(k1, '%Y-%m-%d %H:%i:%s')) from tbl1 limit 1;`
Before: 10.73s
After: 4.85s
The date string format seems still slow, we may need a further enhancement about it.
2020-06-29 19:15:09 +08:00
..
2020-06-06 11:34:12 +08:00
2020-06-06 11:34:12 +08:00
2020-02-24 18:23:08 +08:00
2020-02-24 18:23:08 +08:00
2019-12-23 09:38:37 +08:00
2019-10-11 18:56:59 +08:00
2019-10-31 21:42:58 +08:00
2020-06-03 17:07:54 +08:00
2020-02-25 13:47:20 +08:00
2020-02-24 18:23:08 +08:00
2018-11-02 10:22:32 +08:00
2018-11-02 10:22:32 +08:00
2020-02-25 13:47:20 +08:00
2020-02-24 18:23:08 +08:00
2020-06-03 17:07:54 +08:00
2020-05-20 21:12:02 +08:00
2020-02-25 13:47:20 +08:00
2020-02-24 18:23:08 +08:00
2020-02-25 13:47:20 +08:00
2020-02-24 18:23:08 +08:00
2020-01-13 12:31:37 +08:00
2018-11-12 11:15:39 +08:00
2020-06-29 19:15:09 +08:00
2020-02-25 13:47:20 +08:00
2020-02-24 18:23:08 +08:00
2019-03-22 17:22:16 +08:00
2020-02-24 18:23:08 +08:00
2020-02-24 18:23:08 +08:00
2019-09-23 19:56:20 +08:00
2019-09-23 19:56:20 +08:00
2019-09-23 19:56:20 +08:00
2019-09-23 19:56:20 +08:00
2018-12-12 20:06:35 +08:00
2018-11-02 10:22:32 +08:00
2018-11-02 10:22:32 +08:00
2018-11-02 10:22:32 +08:00
2020-02-24 18:23:08 +08:00
2020-02-24 18:23:08 +08:00
2019-03-22 17:22:16 +08:00
2020-06-08 21:01:30 +08:00
2020-02-25 13:47:20 +08:00
2020-02-24 18:23:08 +08:00
2020-01-17 16:24:02 +08:00
2020-01-17 16:24:02 +08:00
2020-01-13 12:31:37 +08:00
2020-01-13 12:31:37 +08:00
2020-05-09 11:01:48 +08:00
2020-02-19 14:33:05 +08:00
2019-09-29 10:55:23 +08:00
2019-09-09 15:52:10 +08:00
2018-11-02 10:22:32 +08:00
2019-03-22 17:22:16 +08:00
2019-03-22 17:22:16 +08:00
2020-02-24 18:23:08 +08:00
2020-02-24 18:23:08 +08:00
2018-11-02 10:22:32 +08:00
2020-02-24 18:23:08 +08:00
2019-03-22 17:22:16 +08:00
2018-11-02 10:22:32 +08:00
2020-06-13 12:45:16 +08:00
2020-05-28 17:28:33 +08:00
2018-11-02 10:22:32 +08:00
2018-11-02 10:22:32 +08:00
2020-02-25 13:47:20 +08:00
2020-02-24 18:23:08 +08:00
2019-04-29 18:31:24 +08:00
2019-04-29 18:31:24 +08:00
2018-11-02 10:22:32 +08:00
2020-02-24 18:23:08 +08:00
2020-02-24 18:23:08 +08:00
2019-03-22 17:22:16 +08:00
2019-03-22 17:22:16 +08:00
2020-02-25 13:47:20 +08:00
2020-02-24 18:23:08 +08:00
2018-11-02 10:22:32 +08:00
2018-11-02 10:22:32 +08:00
2018-11-02 10:22:32 +08:00
2020-02-26 10:57:57 +08:00
2020-02-24 18:23:08 +08:00
2020-02-25 13:47:20 +08:00
2020-02-24 18:23:08 +08:00
2020-05-22 14:34:26 +08:00
2020-05-09 08:59:34 +08:00
2019-08-29 21:19:19 +08:00
2019-07-23 13:42:39 +08:00
2020-06-29 19:15:09 +08:00
2020-06-29 19:15:09 +08:00
2020-02-24 18:23:08 +08:00
2020-02-24 18:23:08 +08:00
2019-03-22 17:22:16 +08:00
2019-03-22 17:22:16 +08:00
2020-03-29 14:18:19 +08:00
2020-03-29 14:18:19 +08:00