bytedance / bitsail

BitSail is a distributed high-performance data integration engine which supports batch, streaming and incremental scenarios. BitSail is widely used to synchronize hundreds of trillions of data every day.
https://bytedance.github.io/bitsail/
Apache License 2.0
1.63k stars 335 forks source link

[BitSail][bug] Fix PrintSink does not support output NULL values. #431

Closed BlockLiu closed 1 year ago

BlockLiu commented 1 year ago

Signed-off-by:

Pre-Checklist

Note: Please complete ALL items in the following checklist.

Purpose

Current PrintSink will throw NPE when output null values.

fields[i] = String.format("\"%s\":\"%s\"", fieldNames[i], element.getField(i).toString());

Approaches

Check if the value is null before convert it to string.

Related Issues

N/A

New Behavior (screenshots if needed)

N/A