orc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From majetideepak <...@git.apache.org>
Subject [GitHub] orc pull request #126: ORC-191 Implement RLE v1 encoder
Date Tue, 23 May 2017 00:29:10 GMT
Github user majetideepak commented on a diff in the pull request:

    https://github.com/apache/orc/pull/126#discussion_r117873692
  
    --- Diff: c++/src/RLEv1.hh ---
    @@ -26,6 +26,59 @@
     
     namespace orc {
     
    +class RleEncoderV1 : public RleEncoder {
    +public:
    +    RleEncoderV1(std::unique_ptr<BufferedOutputStream> outStream,
    +                 bool hasSigned);
    +    ~RleEncoderV1();
    +
    +    /**
    +     * Encode the next batch of values.
    +     * @param data the array to be written
    +     * @param numValues the number of values to write
    +     * @param notNull If the pointer is null, all values are writen. If the
    +     *    pointer is not null, positions that are false are skipped.
    +     */
    +    void add(const int64_t* data, uint64_t numValues,
    +             const char* notNull) override;
    +
    +    /**
    +     * Get size of buffer used so far.
    +     */
    +    uint64_t getBufferSize() const override {
    +        return outputStream->getSize();
    +    }
    +
    +    /**
    +     * Flushing underlying BufferedOutputStream
    +     */
    +    uint64_t flush() override;
    +
    +    /**
    +     * record current position
    +     * @param recorder use the recorder to record current positions
    +     */
    +    virtual void recordPosition(PositionRecorder* recorder) const override;
    +
    +private:
    +    std::unique_ptr<BufferedOutputStream> outputStream;
    +    bool isSigned;
    +    int64_t* literals;
    +    int numLiterals;
    +    int64_t delta;
    +    bool repeat;
    +    int tailRunLength;
    +    int bufferPosition;
    +    int bufferLength;
    +    char * buffer;
    --- End diff --
    
    `char*` (remove space)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message