Closed killme2008 closed 1 month ago
[!IMPORTANT]
Review skipped
Auto reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yaml
file in this repository. To trigger a single review, invoke the@coderabbitai review
command.You can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 84.74%. Comparing base (
b81d3a2
) to head (301b027
). Report is 1 commits behind head on main.
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
First, the
to_timezone
function doesn't make sense, because GreptimeDB timestamp types don't contain the timezone info, they are always in theUTC
timezone. The timezone only affects the conversation between timestamps and strings, and we already take care of it.Second, the current implementation of
to_timezone
is incorrect, it's return type is always strings:https://github.com/GreptimeTeam/greptimedb/blob/b81d3a28e6223fb3cdcc53f8fed91dc73f99a335/src/common/function/src/scalars/timestamp/to_timezone.rs#L150
But the
return_type
depends on the first input type:https://github.com/GreptimeTeam/greptimedb/blob/b81d3a28e6223fb3cdcc53f8fed91dc73f99a335/src/common/function/src/scalars/timestamp/to_timezone.rs#L64
So let's remove it at all.
Checklist