[
https://issues.apache.org/jira/browse/KYLIN-6042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17928344#comment-17928344
]
Guoliang Sun commented on KYLIN-6042:
-------------------------------------
h3. Dev Design
To resolve this issue with minimal changes, collect all modelContexts matching
the modelId, including snapshots, and delete them together. Since snapshots do
not contain detailed indexes, deleting them has no impact.
For other recommended detailed indexes, they should be deleted if they meet the
criteria, ensuring no detailed index information remains to avoid being
recommended in subsequent logic. When the discard_table_index parameter in the
request is false, this logic will not be executed, and detailed indexes will be
recommended normally. Testing confirms no issues.
> Model acceleration interface: The parameter discard_table_index is not taking
> effect
> ------------------------------------------------------------------------------------
>
> Key: KYLIN-6042
> URL: https://issues.apache.org/jira/browse/KYLIN-6042
> Project: Kylin
> Issue Type: Bug
> Affects Versions: 5.0.0
> Reporter: Guoliang Sun
> Priority: Major
>
> 1. When the parameter discard_table_index is true, detailed index suggestions
> are still generated. API: kylin/api/models/model_optimization
> 2. SQL reference
> {code:java}
> SELECT c.* FROM (
> select a.*, b.* from (
> SELECT LO_ORDERPRIOTITY AS LO_ORDERPRIOTITY
> FROM HANHAN_LOGICAL_VIEW.LOGICAL_VIEW_LINEORDER
> ) a
> right join (
> select * from (
> SELECT trim(C_NAME) AS C_NAME
> FROM SSB.CUSTOMER
> ) d
> ) b
> on trim(a.LO_ORDERPRIOTITY)=b.C_NAME
> ) c{code}
> 3. Two modelContexts were generated with the same targetModel. The
> findFirst() here caused the IndexRexItemMap in the second modelContext not to
> be removed, resulting in the successful creation of detailed index
> suggestions.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)