Hugo Bellomusto created DRILL-5244: -------------------------------------- Summary: negative sign disappears depending on the cast order Key: DRILL-5244 URL: https://issues.apache.org/jira/browse/DRILL-5244 Project: Apache Drill Issue Type: Bug Affects Versions: 1.9.0 Reporter: Hugo Bellomusto
# Create simple table with a double column {code:sql} CREATE TABLE dfs.raw_data.number_test AS SELECT cast( -6 AS DOUBLE) AS val FROM (VALUES(1)) {code} # {code:sql} SELECT CAST( val AS int) / 2 ok , val / 2 error FROM dfs.raw_data.number_test {code} ||ok||error|| |-3|3| # if order is inverted, that's ok {code:sql} SELECT val / 2 now_ok , CAST( val AS int) / 2 ok FROM dfs.raw_data.number_test {code} ||now_ok||ok|| |-3|-3| -- This message was sent by Atlassian JIRA (v6.3.15#6346)