[
https://issues.apache.org/jira/browse/ORC-443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16705119#comment-16705119
]
ASF GitHub Bot commented on ORC-443:
------------------------------------
wgtmac commented on a change in pull request #344: ORC-443: [C++] Code
improvements in ColumnWriter.
URL: https://github.com/apache/orc/pull/344#discussion_r237956027
##########
File path: c++/src/ColumnWriter.cc
##########
@@ -762,25 +770,26 @@ namespace orc {
void DoubleColumnWriter::add(ColumnVectorBatch& rowBatch,
uint64_t offset,
uint64_t numValues) {
- ColumnWriter::add(rowBatch, offset, numValues);
const DoubleVectorBatch* dblBatch =
dynamic_cast<const DoubleVectorBatch*>(&rowBatch);
if (dblBatch == nullptr) {
throw InvalidArgument("Failed to cast to DoubleVectorBatch");
}
-
- const double* doubleData = dblBatch->data.data() + offset;
- const char* notNull = dblBatch->hasNulls ?
- dblBatch->notNull.data() + offset : nullptr;
-
DoubleColumnStatisticsImpl* doubleStats =
- dynamic_cast<DoubleColumnStatisticsImpl*>(colIndexStatistics.get());
+ dynamic_cast<DoubleColumnStatisticsImpl*>(colIndexStatistics.get());
Review comment:
please use same indent
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> [C++] Code improvements in ColumnWriter
> ---------------------------------------
>
> Key: ORC-443
> URL: https://issues.apache.org/jira/browse/ORC-443
> Project: ORC
> Issue Type: Improvement
> Components: C++
> Reporter: Fang Zheng
> Priority: Minor
>
> A few changes to ColumnWriter and its derived classes:
> 1. in add() function, re-order code to verify input parameters before
> modifying any internal state.
> 2. in add() function, move the calls to colIndexStatistics->increase(1) out
> of the loop. Many of those are virtual function calls.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)