{"push_id":731146470,"size":1,"distinct_size":1,"ref":"refs/heads/IMPALA-2020","head":"124e1747ac07c04303f4069d93256724ee8f3850","before":"885b80312bf162dd823e91d010c7fbf68a437e5a","commits":[{"sha":"124e1747ac07c04303f4069d93256724ee8f3850","author":{"email":"f8249166ebee57207c05257bc9491ced177037e5@cloudera.com","name":"Christopher Channing"},"message":"IMPALA-2020: Support implicit rounding of decimals when casting between types.\n\nThis patch introduces a new query option called “DECIMAL_ROUND_MODE” which defines\ntwo states: [0 = TRUNCATE, 1 = ROUND].  In “ROUND” mode, Impala will round fractional\ndecimal values when casting to different types. The casting behavior is modeled on what\nOracle’s RDBMS currently provides. A list of the type conversions handled are:\n\nDouble -> Decimal(P, S)\nFloat -> Decimal(P, S)\nString -> Decimal(P,S)\nDecimal(P, S) -> [Decimal(P2, S2) | Double | TinyInt | SmallInt | Int | BigInt]\nDecimal(P, S) -> VarChar(L):  When DECIMAL_ROUND_MODE is set to ROUND, the length of the\nvarchar is used as the round boundary. A leading zero will be suppressed in favour of\nshowing more digits when there is a constraint on space (which is determined by the\nlength of the varchar). For example:\n    cast(cast(-0.73761 as decimal(7, 7)) as varchar(5)\", \"-.738\")\n\nChange-Id: If757cfc4eb1086734f98386df7d42c4f188433b1","distinct":true,"url":"https://api.github.com/repos/cchanning/Impala/commits/124e1747ac07c04303f4069d93256724ee8f3850"}]}