HAWQ-1774. fix coredump when insert nan to decimal
diff --git a/depends/storage/src/storage/format/orc/writer/decimal-column-writer.cc b/depends/storage/src/storage/format/orc/writer/decimal-column-writer.cc
index df3775e..aa685f8 100644
--- a/depends/storage/src/storage/format/orc/writer/decimal-column-writer.cc
+++ b/depends/storage/src/storage/format/orc/writer/decimal-column-writer.cc
@@ -203,6 +203,11 @@
     }
   }
 
+  if (vector->hasNullValue()) {
+    buf = vector->getNullBuffer()->getReverseBools();
+    notNull = const_cast<char *>(buf->data());
+  }
+
   ColumnWriter::writeVector(vector);
   std::vector<int64_t> scales(numValues, static_cast<int64_t>(scale));