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

ASF GitHub Bot commented on KYLIN-5389:
---------------------------------------

sonarcloud[bot] commented on PR #2075:
URL: https://github.com/apache/kylin/pull/2075#issuecomment-1380096647

   SonarCloud Quality Gate failed.    [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=apache_kylin&pullRequest=2075)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2075&resolved=false&types=BUG)
 
[![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png
 
'E')](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2075&resolved=false&types=BUG)
 [3 
Bugs](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2075&resolved=false&types=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2075&resolved=false&types=VULNERABILITY)
 
[![D](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/D-16px.png
 
'D')](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2075&resolved=false&types=VULNERABILITY)
 [1 
Vulnerability](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2075&resolved=false&types=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_kylin&pullRequest=2075&resolved=false&types=SECURITY_HOTSPOT)
 
[![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png
 
'E')](https://sonarcloud.io/project/security_hotspots?id=apache_kylin&pullRequest=2075&resolved=false&types=SECURITY_HOTSPOT)
 [2 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kylin&pullRequest=2075&resolved=false&types=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2075&resolved=false&types=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2075&resolved=false&types=CODE_SMELL)
 [84 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2075&resolved=false&types=CODE_SMELL)
   
   
[![63.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png
 
'63.0%')](https://sonarcloud.io/component_measures?id=apache_kylin&pullRequest=2075&metric=new_coverage&view=list)
 [63.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_kylin&pullRequest=2075&metric=new_coverage&view=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_kylin&pullRequest=2075&metric=new_duplicated_lines_density&view=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_kylin&pullRequest=2075&metric=new_duplicated_lines_density&view=list)
   
   




> Query error 'reference cc is ambiguous'
> ---------------------------------------
>
>                 Key: KYLIN-5389
>                 URL: https://issues.apache.org/jira/browse/KYLIN-5389
>             Project: Kylin
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: 5.0-alpha
>            Reporter: Jiale He
>            Assignee: Jiale He
>            Priority: Major
>             Fix For: 5.0-alpha
>
>         Attachments: image-2023-01-09-16-07-53-176.png, 
> image-2023-01-09-16-10-51-617.png
>
>
> h1. Root Cause
>  
> 这个问题由  https://issues.apache.org/jira/browse/KYLIN-5324 引入
> 是这个功能特有的问题,只有打开开关 
> *kylin.query.use-tableindex-answer-select-star.enabled=true* 时才会遇到。
>  
> 报错出现在calcite plan转换到spark 
> plan的时候,在解析的时候出现了重复列。重复列是来自打开开关的时候,在使用索引引用的列替换OlapContext的fields的时候没有去重。
> !image-2023-01-09-16-07-53-176.png|width=863,height=237!
>  
> *org.apache.kylin.query.schema.OLAPTable#listTableColumnsIncludingCC*
> !image-2023-01-09-16-10-51-617.png|width=861,height=487!
> 1,dataflow的allColumns取的是indexPlan的allColumns属性,这个是很老的代码,包含了衍生维度的逻辑,会把维度、度量引用的列、join
>  key的外键都加进来。
> 2,取完模型上的列后再次拿取整个项目下的CC,如果在1里拿到了CC,则会引起重复。这次问题就出在这里。
>  
> h1. Fix Design
> 在上述代码里去掉重复列。
>  



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

Reply via email to