You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Guoliang Sun (Jira)" <ji...@apache.org> on 2025/02/19 08:28:00 UTC

[jira] [Commented] (KYLIN-6041) When using the SQL acceleration interface to accelerate multiple SQL queries, the interface returns success, but no indexes are generated

    [ https://issues.apache.org/jira/browse/KYLIN-6041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17928338#comment-17928338 ] 

Guoliang Sun commented on KYLIN-6041:
-------------------------------------

h3. Root Cause

The issue is not due to metadata saving failure but rather the incorrect recommendation of `ReusedModels`. In the `modelSuggestionResponse`, there are two models with the same UUID. When updating `reusedModels[1]`, it overwrites `reusedModels[0]`. However, `reusedModels[0]` contains the recommended indexes and computed columns (CC), which are lost in the process.  

> When using the SQL acceleration interface to accelerate multiple SQL queries, the interface returns success, but no indexes are generated
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: KYLIN-6041
>                 URL: https://issues.apache.org/jira/browse/KYLIN-6041
>             Project: Kylin
>          Issue Type: Bug
>    Affects Versions: 5.0.0
>            Reporter: Guoliang Sun
>            Priority: Major
>
> The API request succeeds, but no indexes are generated on the page.  
> When sending a single SQL query, indexes are successfully generated in the index list.  
> When `accept_recommendation` is set to `false`, the optimization suggestion list displays two recommended indexes.  
> h3. Local Reproduction Steps
> 1. Create a new model `lineorder` with a base detail index.  
> 2. Use the following API to send a request. The response indicates that two aggregation indexes have been added, but the index list does not reflect the new indexes.  
>  
> {code:java}
> curl --location --request POST 'http://ip:port/kylin/api/models/model_optimization' \
> --header 'Accept: application/vnd.apache.kylin-v4-public+json' \
> --header 'Accept-Language: en' \
> --header 'Authorization: Basic QURNSU46S1lMSU4=' \
> --header 'Content-Type: application/json;charset=utf-8' \
> --header 'Cookie: 595a13bd50743a411ff0342be87321b96a5568c535dbbe426f4e311b63911c40=MWVmYTZjOWYtNDUxMS00OGU2LThkNmQtYWFhNWI4YWUzNWJm' \
> --data-raw '{"project":"test",
> "sqls": ["select LO_ORDERDATE from ssb.lineorder group by LO_ORDERDATE"," select * from ( select LO_CUSTKEY , LO_ORDERKEY , LO_PARTKEY, sum(LO_REVENUE-LO_TAX) from ssb.lineorder group by LO_CUSTKEY , LO_ORDERKEY , LO_PARTKEY union all (select C_CUSTKEY as C_CUSTKEY, C_CITY as C_CITY, C_PHONE as C_PHONE, C_REGION as C_REGION from SSB.customer) )"],
> "discard_table_index":true,
> "accept_recommendation":true}'{code}
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)