You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "HappenLee (via GitHub)" <gi...@apache.org> on 2023/02/14 06:39:40 UTC
[GitHub] [doris] HappenLee opened a new pull request, #16734: opt aggreate nullable column
HappenLee opened a new pull request, #16734:
URL: https://github.com/apache/doris/pull/16734
# Proposed changes
Issue Number: close #xxx
## Problem summary
Describe your changes.
## Checklist(Required)
* [ ] Does it affect the original behavior
* [ ] Has unit tests been added
* [ ] Has document been added or modified
* [ ] Does it need to update dependencies
* [ ] Is this PR support rollback (If NO, please explain WHY)
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #16734: opt aggreate nullable column
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16734:
URL: https://github.com/apache/doris/pull/16734#issuecomment-1429204319
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #16734: [Opt](exec) opt aggreate function performance in nullable column
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16734:
URL: https://github.com/apache/doris/pull/16734#issuecomment-1430777614
PR approved by at least one committer and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #16734: [Opt](exec) opt aggreate function performance in nullable column
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16734:
URL: https://github.com/apache/doris/pull/16734#issuecomment-1431297833
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #16734: [Opt](exec) opt aggreate function performance in nullable column
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16734:
URL: https://github.com/apache/doris/pull/16734#issuecomment-1432676098
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] HappenLee merged pull request #16734: [Opt](exec) opt aggreate function performance in nullable column
Posted by "HappenLee (via GitHub)" <gi...@apache.org>.
HappenLee merged PR #16734:
URL: https://github.com/apache/doris/pull/16734
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #16734: [Opt](exec) opt aggreate function performance in nullable column
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16734:
URL: https://github.com/apache/doris/pull/16734#issuecomment-1430680606
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #16734: [Opt](exec) opt aggreate function performance in nullable column
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16734:
URL: https://github.com/apache/doris/pull/16734#issuecomment-1430777642
PR approved by anyone and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #16734: [Opt](exec) opt aggreate function performance in nullable column
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16734:
URL: https://github.com/apache/doris/pull/16734#issuecomment-1430081440
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] BiteTheDDDDt commented on a diff in pull request #16734: [Opt](exec) opt aggreate function performance in nullable column
Posted by "BiteTheDDDDt (via GitHub)" <gi...@apache.org>.
BiteTheDDDDt commented on code in PR #16734:
URL: https://github.com/apache/doris/pull/16734#discussion_r1105512439
##########
be/src/vec/aggregate_functions/helpers.h:
##########
@@ -125,70 +123,32 @@ static IAggregateFunction* create_with_numeric_type(const IDataType& argument_ty
return new AggregateFunctionTemplate<Data<TYPE>>(std::forward<TArgs>(args)...);
FOR_NUMERIC_TYPES(DISPATCH)
#undef DISPATCH
- // if (which.idx == TypeIndex::Enum8) return new AggregateFunctionTemplate<Data<Int8>>(std::forward<TArgs>(args)...);
- // if (which.idx == TypeIndex::Enum16) return new AggregateFunctionTemplate<Data<Int16>>(std::forward<TArgs>(args)...);
- return nullptr;
-}
-
-template <template <typename, typename> class AggregateFunctionTemplate,
- template <typename> class Data, typename... TArgs>
-static IAggregateFunction* create_with_unsigned_integer_type(const IDataType& argument_type,
- TArgs&&... args) {
- WhichDataType which(argument_type);
- if (which.idx == TypeIndex::UInt8) {
- return new AggregateFunctionTemplate<UInt8, Data<UInt8>>(std::forward<TArgs>(args)...);
- }
- if (which.idx == TypeIndex::UInt16) {
- return new AggregateFunctionTemplate<UInt16, Data<UInt16>>(std::forward<TArgs>(args)...);
- }
- if (which.idx == TypeIndex::UInt32) {
- return new AggregateFunctionTemplate<UInt32, Data<UInt32>>(std::forward<TArgs>(args)...);
- }
- if (which.idx == TypeIndex::UInt64) {
- return new AggregateFunctionTemplate<UInt64, Data<UInt64>>(std::forward<TArgs>(args)...);
- }
return nullptr;
}
template <template <typename> class AggregateFunctionTemplate, typename... TArgs>
-static IAggregateFunction* create_with_numeric_based_type(const IDataType& argument_type,
- TArgs&&... args) {
- IAggregateFunction* f = create_with_numeric_type<AggregateFunctionTemplate>(
- argument_type, std::forward<TArgs>(args)...);
- if (f) {
- return f;
- }
-
- /// expects that DataTypeDate based on UInt16, DataTypeDateTime based on UInt32 and UUID based on UInt128
+static IAggregateFunction* create_with_decimal_type(const IDataType& argument_type,
+ TArgs&&... args) {
WhichDataType which(argument_type);
- if (which.idx == TypeIndex::Date) {
- return new AggregateFunctionTemplate<UInt16>(std::forward<TArgs>(args)...);
- }
- if (which.idx == TypeIndex::DateTime) {
- return new AggregateFunctionTemplate<UInt32>(std::forward<TArgs>(args)...);
- }
- if (which.idx == TypeIndex::UUID) {
- return new AggregateFunctionTemplate<UInt128>(std::forward<TArgs>(args)...);
- }
+#define DISPATCH(TYPE) \
+ if (which.idx == TypeIndex::TYPE) \
+ return new AggregateFunctionTemplate<TYPE>(std::forward<TArgs>(args)...);
+ FOR_DECIMAL_TYPES(DISPATCH)
+#undef DISPATCH
return nullptr;
}
template <template <typename> class AggregateFunctionTemplate, typename... TArgs>
-static IAggregateFunction* create_with_decimal_type(const IDataType& argument_type,
- TArgs&&... args) {
- WhichDataType which(argument_type);
- if (which.idx == TypeIndex::Decimal32) {
- return new AggregateFunctionTemplate<Decimal32>(std::forward<TArgs>(args)...);
- }
- if (which.idx == TypeIndex::Decimal64) {
- return new AggregateFunctionTemplate<Decimal64>(std::forward<TArgs>(args)...);
- }
- if (which.idx == TypeIndex::Decimal128) {
- return new AggregateFunctionTemplate<Decimal128>(std::forward<TArgs>(args)...);
- }
- if (which.idx == TypeIndex::Decimal128I) {
- return new AggregateFunctionTemplate<Decimal128I>(std::forward<TArgs>(args)...);
- }
+static IAggregateFunction* create_with_decimal_type_null(const DataTypes& argument_types,
+ const Array& params, TArgs&&... args) {
+ WhichDataType which(argument_types[0]);
+#define DISPATCH(TYPE) \
+ if (which.idx == TypeIndex::TYPE) \
+ return new AggregateFunctionNullUnaryInline<AggregateFunctionTemplate<TYPE>, true>( \
+ new AggregateFunctionTemplate<TYPE>(std::forward<TArgs>(args)...), argument_types, \
+ params);
+ FOR_NUMERIC_TYPES(DISPATCH)
Review Comment:
Maybe there should use `FOR_DECIMAL_TYPES`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] BiteTheDDDDt commented on a diff in pull request #16734: [Opt](exec) opt aggreate function performance in nullable column
Posted by "BiteTheDDDDt (via GitHub)" <gi...@apache.org>.
BiteTheDDDDt commented on code in PR #16734:
URL: https://github.com/apache/doris/pull/16734#discussion_r1105514952
##########
be/src/vec/data_types/data_type_nullable.cpp:
##########
@@ -158,4 +158,16 @@ DataTypePtr remove_nullable(const DataTypePtr& type) {
return type;
}
+DataTypes remove_nullable(const DataTypes& types) {
+ DataTypes no_null_types;
+ for (auto& type : types) {
+ if (type->is_nullable()) {
+ no_null_types.push_back(static_cast<const DataTypeNullable&>(*type).get_nested_type());
Review Comment:
Maybe we can just use `no_null_types.push_back(remove_nullable(type))`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #16734: [Opt](exec) opt aggreate function performance in nullable column
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16734:
URL: https://github.com/apache/doris/pull/16734#issuecomment-1433160574
PR approved by at least one committer and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org