[Enhancement] support simple sql function from Trino&Presto#61850
[Enhancement] support simple sql function from Trino&Presto#61850byBit-ovo wants to merge 4 commits into
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 26655 ms |
TPC-DS: Total hot run time: 168752 ms |
| Status execute_impl(FunctionContext* /*context*/, Block& block, const ColumnNumbers& arguments, | ||
| uint32_t result, size_t input_rows_count) const override { | ||
| const auto& argument_column = | ||
| block.get_by_position(arguments[0]).column->convert_to_full_column_if_const(); |
There was a problem hiding this comment.
no need to do this. the outer framework did.
| return std::to_string(value) + " " + (value == 1 ? singular : plural); | ||
| } | ||
|
|
||
| static std::string _to_human_readable(double seconds) { |
There was a problem hiding this comment.
dont pass string as result. directly write to result column
There was a problem hiding this comment.
need check of consistency between FE and BE. btw, please add more data for test.
There was a problem hiding this comment.
with AI, I think it's easy to make dozens or hundreds of different data to cover the results as much as possible
|
@zclllyybb Hi, I noticed this PR has been inactive for more than a month after review feedback. If there’s no objection, I’d like to continue working on |
welcome! I think now you can quickly complete a high-quality PR through AI, but please pay attention to performance, test coverage, and usage conventions. let me know when the PR is ready~ |
|
Hi @zclllyybb , the PR is ready for review. I addressed the previous review feedback and aligned the implementation with Presto/Trino semantics. I also added FE/BE unit tests, regression tests, and FE/BE consistency validation. Thanks! |
What problem does this PR solve?
Issue Number: #48203
Related PR: #N/A
Problem Summary: support simple sql function
human_readable_seconds( from Trino&Presto )Release note
with millisecond formatting support
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)