Github user sandhyasun commented on a diff in the pull request:
https://github.com/apache/trafodion/pull/1754#discussion_r238726891
--- 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 --
Only during GC it may be useful. It's not absolutely needed. But since we
will be making empty_blob into an inline blob as soon as inline_blob is fully
functional, this implementation will soon change anyway.
---