Skip to content

Commit e92cdda

Browse files
author
dapeng
committed
hbase 允许填充null值
1 parent e0a1043 commit e92cdda

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hbase/hbase-sink/src/main/java/com/dtstack/flink/sql/sink/hbase/HbaseOutputFormat.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ private Put getPutByRow(Row record) {
213213
Put put = new Put(rowKey.getBytes());
214214
for (int i = 0; i < record.getArity(); ++i) {
215215
Object fieldVal = record.getField(i);
216-
if (fieldVal == null) {
217-
continue;
216+
byte[] val = null;
217+
if (fieldVal != null) {
218+
val = fieldVal.toString().getBytes();
218219
}
219-
byte[] val = fieldVal.toString().getBytes();
220220
byte[] cf = families[i].getBytes();
221221
byte[] qualifier = qualifiers[i].getBytes();
222222

0 commit comments

Comments
 (0)