anujphadke has posted comments on this change. ( http://gerrit.cloudera.org:8080/6023 )
Change subject: IMPALA-4848: Add WIDTH_BUCKET() function ...................................................................... Patch Set 15: (1 comment) After rebasing I am seeing a few test failures because of a particular commit - https://github.com/cloudera/Impala/blob/cdh5-trunk/fe/src/main/java/org/apache/impala/analysis/Expr.java#L513 If the input (children type is non decimal it throws an exception because we hit the precondition. The chilType is a TinyInt in this case. [localhost:21000] default> select width_bucket(NULL, 5, 20.1, 4); Query: select width_bucket(NULL, 5, 20.1, 4) Query submitted at: 2018-06-19 15:10:25 (Coordinator: http://anuj-OptiPlex-9020:25000) ERROR: IllegalStateException: null Works fine this way - Query: select width_bucket(NULL, 5.0, 20.1, 4) Query submitted at: 2018-06-19 15:10:21 (Coordinator: http://anuj-OptiPlex-9020:25000) Query progress can be monitored at: http://anuj-OptiPlex-9020:25000/query_plan?query_id=c8413395d2645a21:d1ff71de00000000 +----------------------------------+ | width_bucket(null, 5.0, 20.1, 4) | +----------------------------------+ | NULL | +----------------------------------+ Fetched 1 row(s) in 0.11s http://gerrit.cloudera.org:8080/#/c/6023/15/fe/src/main/java/org/apache/impala/analysis/Expr.java File fe/src/main/java/org/apache/impala/analysis/Expr.java: http://gerrit.cloudera.org:8080/#/c/6023/15/fe/src/main/java/org/apache/impala/analysis/Expr.java@490 PS15, Line 490: result = ((ScalarType)result).getMinResolutionDecimal(); > When I implemented this using decimalVal. I found a bug. Done -- To view, visit http://gerrit.cloudera.org:8080/6023 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I081bc916b1bef7b929ca161a9aade3b54c6b858f Gerrit-Change-Number: 6023 Gerrit-PatchSet: 15 Gerrit-Owner: anujphadke <apha...@cloudera.com> Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com> Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com> Gerrit-Reviewer: Michael Brown <mi...@cloudera.com> Gerrit-Reviewer: Taras Bobrovytsky <tbobrovyt...@cloudera.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-Reviewer: anujphadke <apha...@cloudera.com> Gerrit-Comment-Date: Tue, 19 Jun 2018 23:56:15 +0000 Gerrit-HasComments: Yes