Github user selvaganesang commented on a diff in the pull request:
https://github.com/apache/trafodion/pull/1754#discussion_r238029142
--- Diff: core/sql/exp/ExpLOBaccess.cpp ---
@@ -1779,77 +1779,23 @@ Ex_Lob_Error ExLob::allocateDesc(ULng32 size, Int64
&descNum, Int64 &dataOffset,
lobDebugInfo("In ExLob::allocateDesc",0,__LINE__,lobTrace_);
Int32 openFlags = O_RDONLY ;
HDFS_Client_RetCode hdfsClientRetcode;
+ hdfsFileInfo *fInfo = NULL;
if (! useLibHdfs_) {
- if (size == 0) {
- // Delete and Create the Hdfs file by passing overwrite to TRUE
- hdfsClientRetcode = hdfsClient_->hdfsCreate(lobDataFile_.data(),
TRUE, FALSE, FALSE);
- if (hdfsClientRetcode != HDFS_CLIENT_OK)
- return LOB_DATA_FILE_WRITE_ERROR;
- else {
- dataOffset = 0;
- return LOB_OPER_OK;
- }
- }
- else {
+
dataOffset = hdfsClient_->hdfsSize(hdfsClientRetcode);
--- End diff --
Is there a need to get hdfsSize if the size == 0 and possible set the
dataOffset to -1 or some value to denote that it is an empty lob
---