diff options
author | Parth Chandra <pchandra@maprtech.com> | 2014-10-21 14:30:50 -0700 |
---|---|---|
committer | Jinfeng Ni <jni@maprtech.com> | 2014-11-07 10:50:55 -0800 |
commit | fdbd6a9fc8d846567a272025bd37002d43c7a3fa (patch) | |
tree | a4522854f879018bbe0b450a67e73dce251822f0 /contrib/native/client/src/include | |
parent | 2e07c62f6bd9db240f745b18716b17fecd88d6ef (diff) |
DRILL-1566: C++ Client does not handle incoming record batches with zero records
Diffstat (limited to 'contrib/native/client/src/include')
-rw-r--r-- | contrib/native/client/src/include/drill/recordBatch.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/native/client/src/include/drill/recordBatch.hpp b/contrib/native/client/src/include/drill/recordBatch.hpp index de652029f..28377cb18 100644 --- a/contrib/native/client/src/include/drill/recordBatch.hpp +++ b/contrib/native/client/src/include/drill/recordBatch.hpp @@ -804,8 +804,10 @@ class FieldBatch{ public: FieldBatch(const Drill::FieldMetadata& fmd, const ByteBuf_t data, size_t start, size_t length): m_fieldMetadata(fmd){ - m_pValueVector=NULL; - m_pFieldData=new SlicedByteBuf(data, start, length); + m_pValueVector=NULL;m_pFieldData=NULL; + if(length>0){ + m_pFieldData=new SlicedByteBuf(data, start, length); + } } ~FieldBatch(){ |