[
https://issues.apache.org/jira/browse/KYLIN-5707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17788041#comment-17788041
]
Hongrong Cao commented on KYLIN-5707:
-------------------------------------
h2. Root Cause
This sql is converted to relNode in
org.apache.kylin.query.engine.SQLConverter#convertToRelNode. this process first
does a validation of the query, then converts it to relNode, then compares the
field in the validation with the field in the converted relNode. The next step
is to compare the field in the validation with the field in the converted
relNode, with the same requirements, and an error occurs during the comparison.
Because of the validation, there is a nodeToTypeMap used to save the field
information. select followed by the expression is not nullable, but in the
subsequent conversion, due to the grouping, will be gr1, gr2 become nullable,
then when checking the consistency of the field with the nodeToTypeMap, causing
the comparison to fail and report an error.
h2. Dev Design
We can fix the code cherry-picked from the open source, and set the
AggregatingSelectScope to nullable during validation.
https://issues.apache.org/jira/browse/CALCITE-5145
> update calcite to 1.116.0-kylin-4.x-r028
> ----------------------------------------
>
> Key: KYLIN-5707
> URL: https://issues.apache.org/jira/browse/KYLIN-5707
> Project: Kylin
> Issue Type: Bug
> Affects Versions: 5.0-beta
> Reporter: Hongrong Cao
> Assignee: Ruixuan Zhang
> Priority: Major
> Fix For: 5.0.0
>
>
> update calcite to 1.116.0-kylin-4.x-r028
--
This message was sent by Atlassian Jira
(v8.20.10#820010)