mcvsubbu commented on a change in pull request #4555: [Issue #4551] Remove 
memory allocation for virtual columns in consumi…
URL: https://github.com/apache/incubator-pinot/pull/4555#discussion_r317325242
 
 

 ##########
 File path: 
pinot-core/src/main/java/org/apache/pinot/core/indexsegment/mutable/MutableSegmentImpl.java
 ##########
 @@ -442,13 +470,20 @@ private ColumnDataSource getVirtualDataSource(String 
column) {
     return null;
   }
 
-  @Override
+  /**
+   * Returns a record that contains only physical columns
+   * @param docId document ID
+   * @param reuse a GenericRow object that will be re-used if provided. 
Otherwise, this method will allocate a new one
+   * @return Generic row with physical columns of the specified row.
+   */
   public GenericRow getRecord(int docId, GenericRow reuse) {
     for (FieldSpec fieldSpec : _schema.getAllFieldSpecs()) {
       String column = fieldSpec.getName();
-      reuse.putField(column, IndexSegmentUtils
-          .getValue(docId, fieldSpec, _indexReaderWriterMap.get(column), 
_dictionaryMap.get(column),
-              _maxNumValuesMap.getOrDefault(column, 0)));
+      if (!_schema.isVirtualColumn(column)) {
 
 Review comment:
   Actually, least critical since this is called only during segment build. 
Others are called at query time!
   But yes, I will add it.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to