Commit Graph

32 Commits

Author SHA1 Message Date
lyw b05e7ded50
[Feature](function) support sec_to_time (#62797) 2025-10-11 17:28:48 +08:00
Murphy 3688bc4bd4
[BugFix] fix hour_from_unixtime rule (#63006) 2025-09-12 13:57:33 +08:00
wangshifa.1 d0c5c0cc33
[Feature] Add date function of weekday (#61865)
Why I'm doing:
Fixes #61695

What I'm doing:
Fixes #61695 , add WEEKDAY function similar to the dayofweek_iso function, but it returns numbers from 0 to 6 (corresponding to Monday to Sunday)

Signed-off-by: wangshifa.1 <wangshifa.1@jd.com>
2025-08-19 16:16:45 +08:00
Murphy 2b69350d1b
[BugFix] fix hour_from_unixtime (#61206)
Signed-off-by: Murphy <mofei@starrocks.com>
2025-07-25 10:10:14 +08:00
liubotao d34b14224e
[Feature] add new function to_datetime and to_datetime_ntz (#60637)
Signed-off-by: liubotao <316945435@qq.com>
2025-07-11 22:07:01 +08:00
Murphy d9b23cffb4
[Enhancement] function hour_from_unixtime (#60331)
Signed-off-by: Murphy <mofei@starrocks.com>
2025-07-10 16:16:51 +08:00
SevenJ 21e4aa3c4d
[Feature] implement iceberg transform functions (#58912)
Signed-off-by: SevenJ <wenjun7j@gmail.com>
2025-05-14 15:31:27 +08:00
shuming.li f4a32424ef
[Feature] [Refactor] (COW Part2) Introduce Cow Column in StarRocks (#56287)
Signed-off-by: shuming.li <ming.moriarty@gmail.com>
2025-03-06 11:10:58 +08:00
Seaven 32d369ced3
[BugFix] Fix date_format function error when input with microsecond (#54854)
Signed-off-by: Seaven <seaven_7@qq.com>
2025-01-10 10:27:40 +08:00
Dor Segal d31b157737
[Enhancement] support MySQL `time_format` function (#53724)
Signed-off-by: Dor Segal <dor982@gmail.com>
Signed-off-by: stdpain <drfeng08@gmail.com>
Co-authored-by: stdpain <34912776+stdpain@users.noreply.github.com>
Co-authored-by: stdpain <drfeng08@gmail.com>
2024-12-11 18:58:08 +08:00
stdpain 4720bb1014
[Refactor] Remove unused AnyValUtils (#51680)
Signed-off-by: stdpain <drfeng08@gmail.com>
2024-10-10 13:27:39 +08:00
裸奔丶小馒头 b2fbaeff4a
[Feature] The parse_datetime function throws an exception when parsing fails in trino mode (#39752)
Signed-off-by: changxin <streakxin@foxmail.com>
2024-01-30 18:33:49 +08:00
before-Sunrise 482b6a72f2
[UT] delte unstable ut (#39646)
Signed-off-by: before-Sunrise <unclejyj@gmail.com>
2024-01-22 05:33:22 +00:00
packy92 4e261b96d5
[BugFix] fix time_slice crash when gray upgrade (#39195)
Signed-off-by: packy92 <wangchao@starrocks.com>
2024-01-16 18:58:11 +08:00
Alex Zhu f886dd2eee
[Enhancement] Refine the imple and usage of Status (#37136)
Signed-off-by: Alex Zhu <zhuming9011@gmail.com>
2023-12-16 06:54:32 +00:00
eyes_on_me 54805fdf5f
[Feature] support microsecond-aware now function (#36676)
Signed-off-by: silverbullet233 <3675229+silverbullet233@users.noreply.github.com>
2023-12-11 05:20:17 +00:00
Murphy 1a230ef0e6
[Feature] add support for str_to_jodatime function (#27540)
Signed-off-by: Murphy <mofei@starrocks.com>
2023-09-19 21:14:04 +08:00
shuming.li c78694acaa
[Feature] Support to_tera_date/to_tera_timestamp (#28509)
Signed-off-by: shuming.li <ming.moriarty@gmail.com>
2023-09-13 18:57:33 +08:00
zihe.liu f2fa038481
[BugFix] Fix date_diff with constant type and non-constant date (#29936)
Signed-off-by: ZiheLiu <ziheliu1024@gmail.com>
2023-08-25 08:58:02 +00:00
Silva 842b494b6c
[Enhancement] make all now(), current_timestamp(), localtime(), localtimestamp(), utc_timestamp() functions microsecond-aware (#25021)
Fixes #17499

---------

Signed-off-by: Kevin Li <ming.moriarty@gmail.com>
Signed-off-by: SilvaXiang <xiaosuda1997@outlook.com>
Signed-off-by: Silva <xiaosuda1997@outlook.com>
Signed-off-by: kangkaisen <kangkaisen@apache.org>
Co-authored-by: Kevin Li <ming.moriarty@gmail.com>
Co-authored-by: packy92 <110370499+packy92@users.noreply.github.com>
Co-authored-by: kangkaisen <kangkaisen@apache.org>
2023-07-18 10:31:18 -07:00
ricky b34c8952a1
[BugFix] date_trunc fmt in upper case (#27024)
Fixes https://github.com/StarRocks/starrocks/issues/27022
When the target table is created with `PARTITION BY date_trunc('YEAR',
event_time)`, in which the fmt is in upper case, the insert would get
failure. This PR fixes the issue.
2023-07-13 19:30:24 -07:00
Youngwb 76c5b063a5
[Feature] Suppport jodatime_format function (#26422)
Fixes 
#23422

## Description

Converts a date into a string according to the format that is compatible
with JodaTime’s DateTimeFormat pattern format. Currently it supports
strings with a maximum of 128 bytes. If the length of the returned value
exceeds 128, NULL is returned.

## Syntax

```Haskell
VARCHAR JODATIME_FORMAT(DATETIME date, VARCHAR format)
```

## Parameters

- The `date` parameter must be a valid date or date expression.

- `format` specifies the output format of the date or time.

The available formats could refer to [joda-time
format](https://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html)

## Examples

```Plain Text
mysql> select jodatime_format('2020-06-25 15:58:51', 'yyyy-MM-dd');
+------------------------------------------------------+
| jodatime_format('2020-06-25 15:58:51', 'yyyy-MM-dd') |
+------------------------------------------------------+
| 2020-06-25                                           |
+------------------------------------------------------+
mysql> select jodatime_format('2020-06-25 15:58:51', 'yyyy-MM-dd HH:mm:ss');
+---------------------------------------------------------------+
| jodatime_format('2020-06-25 15:58:51', 'yyyy-MM-dd HH:mm:ss') |
+---------------------------------------------------------------+
| 2020-06-25 15:58:51                                           |
+---------------------------------------------------------------+

```

Signed-off-by: Youngwb <yangwenbo_mailbox@163.com>
2023-07-10 11:22:40 +08:00
xuzifu666 a718b292dc
[Enhancement] add testcase for dayofweek_iso function (#26352) 2023-07-02 20:49:29 +08:00
Youngwb 91e4392588
[Enhancemnent] Support date_add function for trino parser (#25601)
Fixes #issue
#14825 
we need to implent milliseconds_add, quarters_add function in starrocks,
so we can mapping all time unit supported by trino date_add function
(https://trino.io/docs/current/functions/datetime.html?highlight=date_add#date_add)


Signed-off-by: Youngwb <yangwenbo_mailbox@163.com>
2023-06-21 10:45:16 +08:00
imay d843c7dad0
[Refactor] Fix clang compile (#24832)
Fixes #issue

Signed-off-by: imay <buaa.zhaoc@gmail.com>
2023-06-08 08:42:58 +08:00
zhangruchubaba 1ed0c4390a
[Feature] add time function: makedate #13051 (#22464) 2023-05-29 20:43:54 -07:00
qmengss 054b2d6045
[Enhancement] support iso week function (#20511) (#22773)
Signed-off-by: qmengss <707549024@qq.com>
2023-05-04 19:04:52 +08:00
dirtysalt 17ad3171aa
[BugFix] Fix timestamp version2 (#20868) 2023-04-03 10:04:07 +00:00
yangrong688 f3b0517e52
[Feature] Add function utc_time() (#18597) 2023-03-01 18:35:31 +08:00
zuyu ec3160e1f5
[Refactor] PrimitiveType -> LogicalType follow-ups (#17778)
Signed-off-by: Zuyu Zhang <zuyuz@apache.org>

Follow-up changes of renaming PrimitiveType to LogicalType
2023-02-14 12:13:29 -08:00
alvin-coding 5bbcc89e61
[Refactor] Move primitive type (#16346) 2023-01-08 09:50:59 -08:00
lichaoyong c4916a28ba
[Refactor] Rename exprs/vectorized to exprs (#15550) 2022-12-22 07:46:56 +08:00