Definition at line 130 of file Read.h. References Impala::Core::Column::ColumnTem< ElemT >::GetData(), Impala::Util::IOBuffer::Read(), Impala::Util::IOBuffer::ReadLine(), Impala::Core::Column::ColumnTem< ElemT >::Reserve(), and Impala::Util::IOBuffer::Valid(). 00131 { 00132 if (! (buffer && buffer->Valid())) 00133 { 00134 return; 00135 } 00136 int nrElem; 00137 int byteSize; 00138 //fscanf(f.Fp(), "nr strings : %d\n", &nrElem); 00139 std::istringstream iss(buffer->ReadLine() + " 0"); 00140 String dummy; 00141 iss >> dummy >> dummy >> dummy >> nrElem >> byteSize; 00142 col->Reserve(nrElem, false); 00143 String* data = col->GetData(); 00144 if(byteSize > 0) 00145 { 00146 char* binaryData = new char[byteSize]; 00147 buffer->Read(binaryData, byteSize); 00148 int j = 0; 00149 for (int i=0 ; i<nrElem ; i++) 00150 { 00151 int start = j; 00152 while((j<byteSize) && (binaryData[j] != '\n')) 00153 j++; 00154 data[i] = String(&(binaryData[start]), j - start); 00155 j++; 00156 } 00157 delete binaryData; 00158 } 00159 else 00160 { 00161 for (int i=0 ; i<nrElem ; i++) 00162 data[i] = buffer->ReadLine(); 00163 } 00164 }
Here is the call graph for this function:
|