GitHub user vchekan opened a pull request:

    https://github.com/apache/thrift/pull/1462

    Add seek function to TCompactInputProtocol

    When Thrift is used in encoding which combine manual and Thrift 
serialization, such as Apache Parquet then it is required to be able to 
position within a file manually. 
    https://github.com/apache/parquet-format
    As TCompactInputProtocol owns value of transport, it is not possible to 
access it outside of TCompactInputProtocol and perform seek operation.
    
    This patch implements Seek trait for transports which support it.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/vchekan/thrift master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/1462.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1462
    
----
commit 3be8277c5a1a81058bd9457d9de000f6d6fb6528
Author: Vadim Chekan <kot.begemot@...>
Date:   2018-01-06T04:12:47Z

    Added "seek" implementation to transports
    
    In complex applications, such as Apache Parquet, reading data consist of 
mixture of manualy seeking offset and deserailizing object at given offset. As 
protocol owns transport value, it is impossible to access transport to call 
seek() function.
    This patch adds io::Seek trait implementation to thrift's 
TCompactInputProtocol protocols.

commit a5231584f1929b3a63a5ced71122d48dca5a4aaf
Author: Vadim Chekan <kot.begemot@...>
Date:   2018-01-06T04:23:44Z

    Use techically more correct type.

----


---

Reply via email to