[Enhancement](doris-future) Support "REGR_" aggregation functions (PART II)#41240
[Enhancement](doris-future) Support "REGR_" aggregation functions (PART II)#41240zhangstar333 merged 19 commits intoapache:masterfrom
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.h
Outdated
Show resolved
Hide resolved
|
@Yoruet Null property of |
...re/src/main/java/org/apache/doris/nereids/trees/expressions/functions/agg/RegrIntercept.java
Outdated
Show resolved
Hide resolved
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.cpp
Outdated
Show resolved
Hide resolved
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.h
Outdated
Show resolved
Hide resolved
|
@Yoruet I add more comments with detail information. |
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.cpp
Outdated
Show resolved
Hide resolved
...re/src/main/java/org/apache/doris/nereids/trees/expressions/functions/agg/RegrIntercept.java
Outdated
Show resolved
Hide resolved
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.h
Outdated
Show resolved
Hide resolved
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.h
Outdated
Show resolved
Hide resolved
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.h
Outdated
Show resolved
Hide resolved
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.h
Outdated
Show resolved
Hide resolved
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.h
Outdated
Show resolved
Hide resolved
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.h
Outdated
Show resolved
Hide resolved
|
@Yoruet I did some fix on regr_intercept on your branch, you can merge the pull request and do modification on other function. Test case should be taked. Reference https://dbfiddle.uk/MmKrIU9r |
zhiqiang-hhhh
left a comment
There was a problem hiding this comment.
Null value is not processed correctly.
Can you provide corresponding test samples to me |
@zhiqiang-hhhh I compared the data in the test_regr_intercept.out file with that in https://dbfiddle.uk/MmKrIU9r, and it seems that there is nothing wrong. Can you provide more detailed information? |
The reason test_regr_intercept is correct is that I re-write the implementation of regr_itercept in that PR (I created that pull request on your branch to give you an example on how to fix regr_itercept). You can compare the code I submitted with your implementation of regr_itercept, and do fix on regr_slope in a same way. |
|
PR approved by anyone and no changes requested. |
|
We need todo a refactor on all |
Does it include only regr_slope and regr_intercept or does it include other regr_ functions such as regr_sxx |
This is just a comment to remind us to do a refactor in the future, does not means we need to do refactor in this pr. |
|
@Yoruet please add doc in https://github.com/apache/doris-website thank you very mush |
I have already pr the doc.plz check it |
|
PR approved by at least one committer and no changes requested. |
|
run buildall |
|
TeamCity be ut coverage result: |
…RT II) (apache#41240) ## Proposed changes Issue Number: close apache#38975 <!--Describe your changes.--> ```sql mysql> select * from test; +------+------+------+ | id | x | y | +------+------+------+ | 1 | 18 | 13 | | 3 | 12 | 2 | | 5 | 10 | 20 | | 2 | 14 | 27 | | 4 | 5 | 6 | +------+------+------+ 5 rows in set (0.07 sec) mysql> select regr_slope(y,x) , regr_intercept(y,x) from test; +--------------------+----------------------+ | regr_slope(y, x) | regr_intercept(y, x) | +--------------------+----------------------+ | 0.6853448275862069 | 5.512931034482759 | +--------------------+----------------------+ 1 row in set (0.15 sec) ``` --------- Co-authored-by: zhiqiang-hhhh <seuhezhiqiang@163.com>
…RT II) (apache#41240) ## Proposed changes Issue Number: close apache#38975 <!--Describe your changes.--> ```sql mysql> select * from test; +------+------+------+ | id | x | y | +------+------+------+ | 1 | 18 | 13 | | 3 | 12 | 2 | | 5 | 10 | 20 | | 2 | 14 | 27 | | 4 | 5 | 6 | +------+------+------+ 5 rows in set (0.07 sec) mysql> select regr_slope(y,x) , regr_intercept(y,x) from test; +--------------------+----------------------+ | regr_slope(y, x) | regr_intercept(y, x) | +--------------------+----------------------+ | 0.6853448275862069 | 5.512931034482759 | +--------------------+----------------------+ 1 row in set (0.15 sec) ``` --------- Co-authored-by: zhiqiang-hhhh <seuhezhiqiang@163.com>
…RT II) (apache#41240) ## Proposed changes Issue Number: close apache#38975 <!--Describe your changes.--> ```sql mysql> select * from test; +------+------+------+ | id | x | y | +------+------+------+ | 1 | 18 | 13 | | 3 | 12 | 2 | | 5 | 10 | 20 | | 2 | 14 | 27 | | 4 | 5 | 6 | +------+------+------+ 5 rows in set (0.07 sec) mysql> select regr_slope(y,x) , regr_intercept(y,x) from test; +--------------------+----------------------+ | regr_slope(y, x) | regr_intercept(y, x) | +--------------------+----------------------+ | 0.6853448275862069 | 5.512931034482759 | +--------------------+----------------------+ 1 row in set (0.15 sec) ``` --------- Co-authored-by: zhiqiang-hhhh <seuhezhiqiang@163.com>
Proposed changes
Issue Number: close #38975