Dan Hecht has uploaded a new change for review. http://gerrit.cloudera.org:8080/6044
Change subject: IMPALA-4877: fix precedence of unary -/+ ...................................................................... IMPALA-4877: fix precedence of unary -/+ Currently, expressions such as "-2 / 3" parse as "-(2 / 3)". In practice this usually doesn't cause differences for most common expressions. However, it does interact with a heuristic that changes decimal expression types to double when one operand is non-decimal (see JIRA). For example, before this fix, typeof(2.0/3.0) = DECIMAL typeof(-2.0/3.0) = DOUBLE With this fix, both expressions result in a DECIMAL. Technically this is a compatibility breaking change but it seems like no one would expect the current behavior so I think we should fix it. Let me know if you disagree. Change-Id: I39cf388ae6e37e1b1e12ddea5fd3878c9c2620d1 --- M be/src/exprs/expr-test.cc M fe/src/main/cup/sql-parser.cup 2 files changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/44/6044/1 -- To view, visit http://gerrit.cloudera.org:8080/6044 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I39cf388ae6e37e1b1e12ddea5fd3878c9c2620d1 Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Dan Hecht <[email protected]>
