[Enhancement] support simple sql function from Trino&Presto#61850
Open
byBit-ovo wants to merge 4 commits intoapache:masterfrom
Open
[Enhancement] support simple sql function from Trino&Presto#61850byBit-ovo wants to merge 4 commits intoapache:masterfrom
byBit-ovo wants to merge 4 commits intoapache:masterfrom
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
|
run buildall |
TPC-H: Total hot run time: 26655 ms |
TPC-DS: Total hot run time: 168752 ms |
zclllyybb
reviewed
Mar 30, 2026
| 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(); |
Contributor
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) { |
Contributor
There was a problem hiding this comment.
dont pass string as result. directly write to result column
Contributor
There was a problem hiding this comment.
need check of consistency between FE and BE. btw, please add more data for test.
Contributor
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)