Github user KanakaKumar commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2417#discussion_r200843282
--- Diff:
core/src/main/java/org/apache/carbondata/core/datastore/page/UnsafeFixLengthColumnPage.java
---
@@ -359,38 +412,36 @@ public void freeMemory() {
}
}
- @Override
- public void convertValue(ColumnPageValueConverter codec) {
- int pageSize = getPageSize();
+ @Override public void convertValue(ColumnPageValueConverter codec) {
if (dataType == DataTypes.BYTE) {
- for (long i = 0; i < pageSize; i++) {
+ for (long i = 0; i < totalLength / ByteUtil.SIZEOF_BYTE; i++) {
--- End diff --
for loop end condition (totalLength / ByteUtil.SIZEOF_BYTE) is evaluated
for every row. if we extract the computation of page size to a method, we can
avoid this
---