gazelle_plugin icon indicating copy to clipboard operation
gazelle_plugin copied to clipboard

0.0/0 return 0.0

Open jackylee-ch opened this issue 2 years ago • 3 comments

jackylee-ch avatar Jan 13 '23 03:01 jackylee-ch

@jackylee-ch I thought your patch (https://github.com/oap-project/arrow/pull/186) should fix this issue?

zhouyuan avatar Jan 18 '23 06:01 zhouyuan

Hm, it is another problem. Here is the reproduce code.

create table test_int(a int) using parquet;
insert overwrite test_int values(0);
-- this returns null as expected.
select a / 0 from test_int;
-- this returns 0.0, which is the actual problem.
select a * 1.0 / 0 from test_int;

jackylee-ch avatar Jan 18 '23 06:01 jackylee-ch

Hm, it is the problem for divide/mod with decimal, I didn't fix it in (https://github.com/oap-project/arrow/pull/186)

jackylee-ch avatar Jan 18 '23 07:01 jackylee-ch