Hussain Towaileb has posted comments on this change. ( https://asterix-gerrit.ics.uci.edu/3433 )
Change subject: [ASTERIXDB-2584][FUN] Support rounding digit for round() ...................................................................... Patch Set 9: Code-Review+1 (2 comments) https://asterix-gerrit.ics.uci.edu/#/c/3433/7/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericRoundEvaluator.java File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericRoundEvaluator.java: https://asterix-gerrit.ics.uci.edu/#/c/3433/7/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericRoundEvaluator.java@160 PS7, Line 160: // Validity of arguments > Do we have this behavior (only accepting whole numbers) for casting floatin I added that check recently, so I can't tell for sure regarding the other functions, but I did use this implementation in all the functions I created (95% sure). Maybe other functions are doing the same check in a different way, but I'll have to check for that if you want. Just to give you an idea of why this appeared, N1QL's documentation states that arguments like position, count, ... etc are of type int64. However, when I did some tests, I noticed that if you give them a position of 4.3, they fail, but if you give it 4.0, it works fine. Based on some tests here and there in N1QL, it seems that they consider any X.0 a valid int64 and do the conversion, and hence, why I implemented that method just recently. https://asterix-gerrit.ics.uci.edu/#/c/3433/7/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericRoundEvaluator.java@169 PS7, Line 169: : ATypeHierarchy.ge > Would it make sense to fold this in (i.e. set roundingDigit to 0 and run th I believe so, you're right, I'll do that. -- To view, visit https://asterix-gerrit.ics.uci.edu/3433 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibdde2745e8bc440556e45ed07262eb33327f842b Gerrit-Change-Number: 3433 Gerrit-PatchSet: 9 Gerrit-Owner: Hussain Towaileb <hussai...@gmail.com> Gerrit-Reviewer: Ali Alsuliman <ali.al.solai...@gmail.com> Gerrit-Reviewer: Anon. E. Moose (1000171) Gerrit-Reviewer: Dmitry Lychagin <dmitry.lycha...@couchbase.com> Gerrit-Reviewer: Hussain Towaileb <hussai...@gmail.com> Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Gerrit-Reviewer: Till Westmann <ti...@apache.org> Gerrit-Comment-Date: Wed, 12 Jun 2019 19:50:17 +0000 Gerrit-HasComments: Yes