Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1102#discussion_r126428076
--- Diff:
processing/src/main/java/org/apache/carbondata/processing/store/TablePage.java
---
@@ -84,19 +112,28 @@
measurePage = new ColumnPage[model.getMeasureCount()];
DataType[] dataTypes = model.getMeasureDataType();
for (int i = 0; i < measurePage.length; i++) {
- measurePage[i] = ColumnPage.newPage(dataTypes[i], pageSize);
+ ColumnPage page = ColumnPage.newPage(dataTypes[i], pageSize);
+
page.setStatsCollector(PrimitivePageStatsCollector.newInstance(dataTypes[i],
pageSize));
+ measurePage[i] = page;
}
+ boolean hasNoDictionary = noDictDimensionPage.length > 0;
+ this.key = new TablePageKey(pageSize, model.getMDKeyGenerator(),
model.getSegmentProperties(),
+ hasNoDictionary);
}
/**
- * Add one row to the internal store, it will be converted into columnar
layout
+ * Add one row to the internal store
*
* @param rowId Id of the input row
* @param row row object
*/
public void addRow(int rowId, CarbonRow row) throws KeyGenException {
- // convert each column category
+ // convert each column category, update key and stats
+ convertToColumnar(rowId, row);
+ key.update(rowId, row);
--- End diff --
fixed
---
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 [email protected] or file a JIRA ticket
with INFRA.
---