You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/01/10 11:16:00 UTC

[jira] [Commented] (KYLIN-5389) Query error 'reference cc is ambiguous'

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

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

JialeHe opened a new pull request, #2075:
URL: https://github.com/apache/kylin/pull/2075

   ## Proposed changes
   
   Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
   
   ## Branch to commit
   - [ ] Branch **kylin3** for v2.x to v3.x
   - [ ] Branch **kylin4** for v4.x
   - [x] Branch **kylin5** for v5.x
   
   ## Types of changes
   
   What types of changes does your code introduce to Kylin?
   _Put an `x` in the boxes that apply_
   
   - [x] Bugfix (non-breaking change which fixes an issue)
   - [x] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [ ] Documentation Update (if none of the other choices apply)
   
   ## Checklist
   
   _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
   
   - [x] I have created an issue on [Kylin's jira](https://issues.apache.org/jira/browse/KYLIN), and have described the bug/feature there in detail
   - [x] Commit messages in my PR start with the related jira ID, like "KYLIN-0000 Make Kylin project open-source"
   - [x] Compiling and unit tests pass locally with my changes
   - [x] I have added tests that prove my fix is effective or that my feature works
   - [x] I have added necessary documentation (if appropriate)
   - [x] Any dependent changes have been merged
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at user@kylin.apache.org or dev@kylin.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...
   




> 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)