|
@@ -37,6 +37,8 @@ public:
|
|
virtual void setPartitionRange(offset_t _totalSize, offset_t _thisOffset, offset_t _thisSize, unsigned _thisHeaderSize, unsigned _numParts);
|
|
virtual void setPartitionRange(offset_t _totalSize, offset_t _thisOffset, offset_t _thisSize, unsigned _thisHeaderSize, unsigned _numParts);
|
|
virtual void setSource(unsigned _whichInput, const RemoteFilename & _fullPath, bool compressedInput, const char *decryptKey);
|
|
virtual void setSource(unsigned _whichInput, const RemoteFilename & _fullPath, bool compressedInput, const char *decryptKey);
|
|
virtual void setTarget(IOutputProcessor * _target);
|
|
virtual void setTarget(IOutputProcessor * _target);
|
|
|
|
+ virtual void setRecordStructurePresent(bool _recordStructurePresent);
|
|
|
|
+ virtual void getRecordStructure(StringBuffer & _recordStructure);
|
|
|
|
|
|
protected:
|
|
protected:
|
|
virtual void findSplitPoint(offset_t curOffset, PartitionCursor & cursor) = 0;
|
|
virtual void findSplitPoint(offset_t curOffset, PartitionCursor & cursor) = 0;
|
|
@@ -230,6 +232,9 @@ public:
|
|
|
|
|
|
virtual void setTarget(IOutputProcessor * _target);
|
|
virtual void setTarget(IOutputProcessor * _target);
|
|
|
|
|
|
|
|
+ virtual void getRecordStructure(StringBuffer & _recordStructure) { _recordStructure = recordStructure; }
|
|
|
|
+ virtual void setRecordStructurePresent( bool _isRecordStructurePresent) {isRecordStructurePresent = _isRecordStructurePresent;}
|
|
|
|
+
|
|
protected:
|
|
protected:
|
|
virtual size32_t getSplitRecordSize(const byte * record, unsigned maxToRead, bool processFullBuffer, bool ateof);
|
|
virtual size32_t getSplitRecordSize(const byte * record, unsigned maxToRead, bool processFullBuffer, bool ateof);
|
|
virtual size32_t getTransformRecordSize(const byte * record, unsigned maxToRead);
|
|
virtual size32_t getTransformRecordSize(const byte * record, unsigned maxToRead);
|
|
@@ -238,11 +243,19 @@ protected:
|
|
return getSplitRecordSize(record,maxToRead,processFullBuffer,true);
|
|
return getSplitRecordSize(record,maxToRead,processFullBuffer,true);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+private:
|
|
|
|
+ void storeFieldName(const char * start, unsigned len);
|
|
|
|
+
|
|
protected:
|
|
protected:
|
|
enum { NONE=0, SEPARATOR=1, TERMINATOR=2, WHITESPACE=3, QUOTE=4, ESCAPE=5 };
|
|
enum { NONE=0, SEPARATOR=1, TERMINATOR=2, WHITESPACE=3, QUOTE=4, ESCAPE=5 };
|
|
unsigned maxElementLength;
|
|
unsigned maxElementLength;
|
|
FileFormat format;
|
|
FileFormat format;
|
|
StringMatcher matcher;
|
|
StringMatcher matcher;
|
|
|
|
+
|
|
|
|
+ bool isRecordStructurePresent;
|
|
|
|
+ StringBuffer recordStructure;
|
|
|
|
+ unsigned fieldCount;
|
|
|
|
+ bool isFirstRow;
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
@@ -410,6 +423,8 @@ public:
|
|
virtual void setPartitionRange(offset_t _totalSize, offset_t _thisOffset, offset_t _thisSize, unsigned _thisHeaderSize, unsigned _numParts);
|
|
virtual void setPartitionRange(offset_t _totalSize, offset_t _thisOffset, offset_t _thisSize, unsigned _thisHeaderSize, unsigned _numParts);
|
|
virtual void setSource(unsigned _whichInput, const RemoteFilename & _fullPath, bool compressedInput, const char *decryptKey);
|
|
virtual void setSource(unsigned _whichInput, const RemoteFilename & _fullPath, bool compressedInput, const char *decryptKey);
|
|
virtual void setTarget(IOutputProcessor * _target) { UNIMPLEMENTED; }
|
|
virtual void setTarget(IOutputProcessor * _target) { UNIMPLEMENTED; }
|
|
|
|
+ virtual void setRecordStructurePresent(bool _recordStructurePresent);
|
|
|
|
+ virtual void getRecordStructure(StringBuffer & _recordStructure);
|
|
|
|
|
|
protected:
|
|
protected:
|
|
void callRemote();
|
|
void callRemote();
|