-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix]Remove be special handling of date types and bugs in registration functions #45159
base: master
Are you sure you want to change the base?
Conversation
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
run buildall |
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 39869 ms
|
TPC-DS: Total hot run time: 197769 ms
|
ClickBench: Total hot run time: 33.24 s
|
run p0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some be-ut to show we can't pass the check because of use wrong return type.(to mock FE send a function signature with wrong return type)
@@ -158,19 +167,21 @@ class SimpleFunctionFactory { | |||
FunctionBasePtr get_function(const std::string& name, const ColumnsWithTypeAndName& arguments, | |||
const DataTypePtr& return_type, const FunctionAttr& attr = {}, | |||
int be_version = BeExecVersionManager::get_newest_version()) { | |||
std::string key_str = name; | |||
std::string key_str, ori_name = name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
split definition. use origin_name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add comment on these two var
be/src/vec/functions/function.h
Outdated
@@ -299,6 +299,10 @@ class FunctionBuilderImpl : public IFunctionBuilder { | |||
|
|||
ColumnNumbers get_arguments_that_are_always_constant() const override { return {}; } | |||
|
|||
// if a function's get_variadic_argument_types() not override and get_return_type_impl() | |||
// result is not compile time be sure, the function should override return true | |||
virtual bool dont_append_return_type_name_when_register_function() { return false; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
impl it in IFunctionBase
, so we can do check in function factory.
if not possible, add comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the register_function()
arg Creator& ptr
is a FunctionBuilder so cant impl it in IFunctionBase it move to IFunctionBuilder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add regression-test about null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert this
|
||
@Override | ||
public Expression withConstantArgs(Expression literal) { | ||
return new Date(literal); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why don't return new ToDate(literal)? maybe adding Monotonic of Datev2, ToDate, ToDateV2 need some tests in partition prune. Can we choose to not add Monotonic for Datev2, ToDate, ToDateV2 in this pr?
|
||
@Override | ||
public Expression withConstantArgs(Expression literal) { | ||
return new Date(literal); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why don't return new ToDateV2(literal)?
run buildall |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
@@ -17,6 +17,7 @@ | |||
|
|||
#pragma once | |||
|
|||
#include <glog/logging.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'glog/logging.h' file not found [clang-diagnostic-error]
#include <glog/logging.h>
^
run buildall |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
run buildall |
run performance |
TeamCity be ut coverage result: |
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)