anujphadke has posted comments on this change. ( http://gerrit.cloudera.org:8080/8344 )
Change subject: IMPALA-5018: Error on decimal modulo or divide by zero ...................................................................... Patch Set 3: (1 comment) http://gerrit.cloudera.org:8080/#/c/8344/3/be/src/exprs/expr-test.cc File be/src/exprs/expr-test.cc: http://gerrit.cloudera.org:8080/#/c/8344/3/be/src/exprs/expr-test.cc@2506 PS3, Line 2506: 0/0 > Seems like something we should fix, even if it's part of a different change I think we should even change the math function fmod to return a consistent error? Maybe as part of the other change proposed above (Since fmod casted this to float or double) - [localhost:21000] > select fmod(cast(9 as decimal(38, 7)), 0); Query: select fmod(cast(9 as decimal(38, 7)), 0) Query submitted at: 2017-10-23 13:03:29 (Coordinator: http://anuj-OptiPlex-9020:25000) Query progress can be monitored at: http://anuj-OptiPlex-9020:25000/query_plan?query_id=9a48d96079161183:fdd6aed300000000 +-----------------------------------+ | fmod(cast(9 as decimal(38,7)), 0) | +-----------------------------------+ | NULL | +-----------------------------------+ Fetched 1 row(s) in 0.01s [localhost:21000] > select cast(9 as decimal(38,7)) % 0; Query: select cast(9 as decimal(38,7)) % 0 Query submitted at: 2017-10-23 13:13:12 (Coordinator: http://anuj-OptiPlex-9020:25000) Query progress can be monitored at: http://anuj-OptiPlex-9020:25000/query_plan?query_id=bc4c087b22f4e1f7:1302ad6a00000000 ERROR: UDF ERROR: Cannot divide decimal by zero -- To view, visit http://gerrit.cloudera.org:8080/8344 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If7a7131e657fcdd293ade78d62f851dac0f1e3eb Gerrit-Change-Number: 8344 Gerrit-PatchSet: 3 Gerrit-Owner: Taras Bobrovytsky <[email protected]> Gerrit-Reviewer: Dan Hecht <[email protected]> Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Taras Bobrovytsky <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-Reviewer: Vuk Ercegovac <[email protected]> Gerrit-Reviewer: Zach Amsden <[email protected]> Gerrit-Reviewer: anujphadke <[email protected]> Gerrit-Comment-Date: Mon, 23 Oct 2017 20:18:24 +0000 Gerrit-HasComments: Yes
