carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Liang Chen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CARBONDATA-1801) Remove unnecessary mdk computation code
Date Sat, 16 Dec 2017 15:19:00 GMT

     [ https://issues.apache.org/jira/browse/CARBONDATA-1801?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Liang Chen resolved CARBONDATA-1801.
------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.3.0

> Remove unnecessary mdk computation code
> ---------------------------------------
>
>                 Key: CARBONDATA-1801
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-1801
>             Project: CarbonData
>          Issue Type: Improvement
>            Reporter: jiangmanhua
>            Assignee: jiangmanhua
>            Priority: Minor
>             Fix For: 1.3.0
>
>          Time Spent: 4h 20m
>  Remaining Estimate: 0h
>
> In `org.apache.carbondata.core.datastore.page.key.TablePageKey#update`, argument `mdk`
can be reused to avoid duplicate computation for mdk by replacing  `WriteStepRowUtil.getMdk(row,
mdkGenerator)`
> Original Code:
> {code:java}
>   /** update all keys based on the input row */
>   public void update(int rowId, CarbonRow row, byte[] mdk) throws KeyGenException {
>     if (hasNoDictionary) {
>       currentNoDictionaryKey = WriteStepRowUtil.getNoDictAndComplexDimension(row);
>     }
>     if (rowId == 0) {
>       startKey = WriteStepRowUtil.getMdk(row, mdkGenerator);
>       noDictStartKey = currentNoDictionaryKey;
>     }
>     noDictEndKey = currentNoDictionaryKey;
>     if (rowId == pageSize - 1) {
>       endKey = WriteStepRowUtil.getMdk(row, mdkGenerator);
>       finalizeKeys();
>     }
>   }
> {code}
> https://github.com/apache/carbondata/blob/74226907990cdee41a6ccbd69e2a813077792f89/core/src/main/java/org/apache/carbondata/core/datastore/page/key/TablePageKey.java#L66



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message