Joe McDonnell created IMPALA-14190:
--------------------------------------

             Summary: Improve const-correctness for RowBatch
                 Key: IMPALA-14190
                 URL: https://issues.apache.org/jira/browse/IMPALA-14190
             Project: IMPALA
          Issue Type: Task
          Components: Backend
    Affects Versions: Impala 5.0.0
            Reporter: Joe McDonnell


A variety of RowBatch methods are not marked const when they could be (or don't 
provide a const equivalent). This means that code can have a hard time using a 
"const RowBatch*", even if it is only using the RowBatch in a read-only way. 
For example, Serialize() is not marked const, so TupleFileWriter needs to take 
in a non-const RowBatch into Write() even though it doesn't otherwise need to 
modify the RowBatch.

Another example is that the RowBatch::Iterator takes in a non-const RowBatch*. 
Some pieces of code iterate over a RowBatch without modifying it, so a const 
iterator could make sense.

Having more code using const RowBatches make it clearer and safer.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to