You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Zhong Yanghong (Jira)" <ji...@apache.org> on 2020/03/10 05:19:00 UTC
[jira] [Updated] (KYLIN-4325) ”Value not exists“ when invoke getIdFromValue() for decimal field during cube building
[ https://issues.apache.org/jira/browse/KYLIN-4325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zhong Yanghong updated KYLIN-4325:
----------------------------------
Parent: KYLIN-4411
Issue Type: Sub-task (was: Improvement)
> ”Value not exists“ when invoke getIdFromValue() for decimal field during cube building
> --------------------------------------------------------------------------------------
>
> Key: KYLIN-4325
> URL: https://issues.apache.org/jira/browse/KYLIN-4325
> Project: Kylin
> Issue Type: Sub-task
> Components: Job Engine
> Reporter: Zhong Yanghong
> Assignee: Zhong Yanghong
> Priority: Major
>
> For decimal field, the following logic in *SelfDefineSortableKey* is not correct:
> {code}
> public void init(Text key, byte typeId) {
> this.typeId = typeId;
> this.rawKey = key;
> if (isNumberFamily()) {
> String valueStr = new String(key.getBytes(), 1, key.getLength() - 1, StandardCharsets.UTF_8);
> if (isIntegerFamily()) {
> this.keyInObj = Long.parseLong(valueStr);
> } else {
> this.keyInObj = Double.parseDouble(valueStr);
> }
> } else {
> this.keyInObj = key;
> }
> }
> {code}
> Since the result of Double.valueOf("206779569545636097").toString() == "206779569545636097" is false.
> When encoding decimal fields, it's better to regard it as a string rather than a number.
> What's more, when building global dictionary, even for other numeric field, we should regard it as string rather than number
--
This message was sent by Atlassian Jira
(v8.3.4#803005)