jt2594838 commented on a change in pull request #464: Modified Decoder and
SequenceReader to support old version of TsFile
URL: https://github.com/apache/incubator-iotdb/pull/464#discussion_r337364532
##########
File path:
tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java
##########
@@ -346,6 +341,12 @@ private ChunkHeader readChunkHeader(long position,
boolean markerRead) throws IO
* @return the pages of this chunk
*/
public ByteBuffer readChunk(ChunkHeader header) throws IOException {
+ if (this.readVersionNumber().startsWith("v")) {
+ config.setEndian("LITTLE_ENDIAN");
+ }
+ else {
+ config.setEndian("BIG_ENDIAN");
+ }
Review comment:
You may add a field in TsFileSequenceReader to indicate the byte order and
pass it down throughout the query process.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services