[
https://issues.apache.org/jira/browse/KYLIN-6049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17928366#comment-17928366
]
Guoliang Sun commented on KYLIN-6049:
-------------------------------------
h3. Root Cause
In the CC metadata JSON, there is an `expressionMD5` attribute. This attribute
is calculated based on the formatted CC expression (`rexNodeStr`) and the
model's join graph, serving as a unique mapping of the CC's semantics.
However, in the CC metadata table, the `expression_md5` column is calculated
directly from the CC expression (`expression`) without considering the join
graph or formatting. As a result, it cannot uniquely represent the semantics of
the CC.
The constraint on the CC table is based on the `expression_md5` column, which
only considers the expression itself. Therefore, this constraint is not
accurate enough to ensure semantic uniqueness.
----
h3. Dev Design
When saving metadata, directly map the `expressionMD5` property from the JSON
to the `expression_md5` column in the CC table. This ensures that the
`expression_md5` column accurately reflects the unique semantics of the CC,
aligning it with the value calculated during metadata processing.
> Incorrect Calculation of `expressionMd5` Value When Saving Computable Columns
> -----------------------------------------------------------------------------
>
> Key: KYLIN-6049
> URL: https://issues.apache.org/jira/browse/KYLIN-6049
> Project: Kylin
> Issue Type: Bug
> Affects Versions: 5.0.0
> Reporter: Guoliang Sun
> Priority: Major
>
> When saving a computable column, the `expressionMd5` value in the JSON does
> not match the `expressionMd5` value on the table.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)