Taras Bobrovytsky has posted comments on this change. ( http://gerrit.cloudera.org:8080/10066 )
Change subject: IMPALA-6522: [DOCS] Document Decimal V2 ...................................................................... Patch Set 10: (5 comments) http://gerrit.cloudera.org:8080/#/c/10066/10/docs/topics/impala_decimal.xml File docs/topics/impala_decimal.xml: http://gerrit.cloudera.org:8080/#/c/10066/10/docs/topics/impala_decimal.xml@50 PS10, Line 50: This data type is suitable for financial and other arithmetic calculations where the We should have a better introduction. We would not be comparing it to FLOAT. We should not mention that it's suitable for financial purposes. How about this: Precision is the maximum number of decimal digits and scale is the number of digits to the right of the decimal point. The data type is useful for storing and doing operations on precise decimal values. http://gerrit.cloudera.org:8080/#/c/10066/10/docs/topics/impala_decimal.xml@56 PS10, Line 56: The key differences between this version of <codeph>DECIMAL</codeph> and the previous We should move this table to the bottom. Instead of calling it DECIMAL_V1 and DECIMAL_v2 we should say "Decimal in Impala 2.x" and "Decimal in Impala 3.x". Say that the old behavior can be enabled by disabling the query option "set decimal_v2=false" http://gerrit.cloudera.org:8080/#/c/10066/10/docs/topics/impala_decimal.xml@293 PS10, Line 293: If the precision of the result would be greater than 38, Impala truncates the result from > truncates and rounds, right Taras? yes, "truncates and rounds" Let's make a separate section called "Decimal Assignment" as Alex mentioned and put UNION in that section. http://gerrit.cloudera.org:8080/#/c/10066/10/docs/topics/impala_decimal.xml@668 PS10, Line 668: expressions to <codeph>DECIMAL</codeph> as long as the overall number of digits and digits > Taras? Alex is right. This contradicts what it says on line 678. should be "... as number fits within the specified target DECIMAL type without overflow" http://gerrit.cloudera.org:8080/#/c/10066/10/docs/topics/impala_decimal.xml@879 PS10, Line 879: Any values that do not fit within the new precision and scale are returned as > Taras, is this really true? I would have expected that we round or error. No, we do not round. We will error if the query option ABORT_ON_ERROR is set to true. If that option is set to FALSE, we will get a NULL and warning that conversion failed. -- To view, visit http://gerrit.cloudera.org:8080/10066 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic436ff80c9ad05cfada97280cd47552879214a3d Gerrit-Change-Number: 10066 Gerrit-PatchSet: 10 Gerrit-Owner: Alex Rodoni <arod...@cloudera.com> Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com> Gerrit-Reviewer: Alex Rodoni <arod...@cloudera.com> Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com> Gerrit-Reviewer: Greg Rahn <gr...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Taras Bobrovytsky <tbobrovyt...@cloudera.com> Gerrit-Comment-Date: Sat, 28 Apr 2018 01:09:13 +0000 Gerrit-HasComments: Yes