doris icon indicating copy to clipboard operation
doris copied to clipboard

[Bug] BitmapUnion and toBitmap UDAF throws NPE when the mapreduce job only has map task

Open xiaoDjun opened this issue 3 years ago • 0 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Version

1.1.3-rc02

What's Wrong?

When using the UDF in hive to get a doris bitmap representation of a column (e.g. bitmap_union, to_bitmap), an NPE occurs if the submitted mapreduce job only has map task, no reduce task. The exception stack is as below: img_v2_1873e203-a34a-468a-b5e5-8a4a7efd653g

This is because in BitmapUnionUDAF/ToBitmapUDAF, the Mode should be Mode.COMPLETE, so the BinaryObjectInspector inputOI will not be initialized here: image

What You Expected?

run successfully and get doris representation bitmap result.

How to Reproduce?

e.g. creating as temporary function, query and run with only map task, no reduce task

Anything Else?

No response

Are you willing to submit PR?

  • [X] Yes I am willing to submit a PR!

Code of Conduct

xiaoDjun avatar Mar 07 '23 13:03 xiaoDjun