Quanlong Huang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/19569 )

Change subject: IMPALA-11957: Implement Regression functions: regr_slope(), 
regr_intercept() and regr_r2()
......................................................................


Patch Set 16:

(3 comments)

> Patch Set 16:
>
> > Patch Set 16:
> >
> > (1 comment)
>
> Please ignore patch 15. I've removed 2 tests from the patch:
> select s_store_sk, regr_slope(s_number_employees, s_floor_space) over 
> (partition by s_city order by s_store_sk
>  rows between 1 preceding and 1 following) from tpcds.store;
> and
> select s_store_sk, regr_intercept(s_number_employees, s_floor_space) over 
> (partition by s_city order by s_store_sk
>  rows between 1 preceding and 1 following) from tpcds.store;
> as they were resulting in wrong results when compared to hive. The reason for 
> the wrong results does not correspond to the code but is because of different 
> implementaion for evaluating window functions in Hive and Impala.
> This was verified by runnig a query independent of regression functions.
> A separate jira can be filed to look further into it.

I filed IMPALA-12347 to track the different results with Hive due to floating 
point computation error.

http://gerrit.cloudera.org:8080/#/c/19569/16/be/src/exprs/aggregate-functions-ir.cc
File be/src/exprs/aggregate-functions-ir.cc:

http://gerrit.cloudera.org:8080/#/c/19569/16/be/src/exprs/aggregate-functions-ir.cc@316
PS16, Line 316:   dst->ptr = ctx->Allocate(dst->len);
We need to deal with allocation failure here, e.g.
https://github.com/apache/impala/blob/8638255e5074f1342dfc452bca39f649a76612d6/be/src/exprs/aggregate-functions-ir.cc#L1678-L1682

CorrInit() and CovarInit() are also missing this.


http://gerrit.cloudera.org:8080/#/c/19569/16/be/src/exprs/aggregate-functions-ir.cc@508
PS16, Line 508:
nit: empty line


http://gerrit.cloudera.org:8080/#/c/19569/16/fe/src/main/java/org/apache/impala/catalog/BuiltinsDb.java
File fe/src/main/java/org/apache/impala/catalog/BuiltinsDb.java:

http://gerrit.cloudera.org:8080/#/c/19569/16/fe/src/main/java/org/apache/impala/catalog/BuiltinsDb.java@1372
PS16, Line 1372:
nit: use 4 spaces indention



--
To view, visit http://gerrit.cloudera.org:8080/19569
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iab6bd84ae3e0c02ec924c30183308123b951caa3
Gerrit-Change-Number: 19569
Gerrit-PatchSet: 16
Gerrit-Owner: Anonymous Coward <pranav.lo...@cloudera.com>
Gerrit-Reviewer: Anonymous Coward <pranav.lo...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <daniel.bec...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Kurt Deschler <kdesc...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <huangquanl...@gmail.com>
Gerrit-Comment-Date: Tue, 08 Aug 2023 08:35:34 +0000
Gerrit-HasComments: Yes

Reply via email to