You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Zhen Chen (Jira)" <ji...@apache.org> on 2025/02/22 09:41:00 UTC
[jira] [Updated] (CALCITE-6852) Project's digest calculation error, should include FieldNames in rowType
[ https://issues.apache.org/jira/browse/CALCITE-6852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zhen Chen updated CALCITE-6852:
-------------------------------
Description:
When I was building test cases for CALCITE-6850, I found that the results did not meet my expectations. When debugging the code, I discovered that the project's digest calculation did not include column names, This leads to the inability to correctly find the correct project during the findBestExp process.
debug picture:
!image-2025-02-22-17-19-46-706.png!
I think we need to add column names in computing project's degist like this:
{code:java}
// code now
protected int deepHashCode0() {
return Objects.hash(traitSet, input.deepHashCode(), exps, hints);
}
// should change to
protected int deepHashCode0() {
return Objects.hash(traitSet, input.deepHashCode(), rowType.getFieldNames(), exps, hints);
}{code}
This change will affect some cases and the results of these cases need to be fixed.
If calcite need this change, I can pull a pr. If this issue is not fixed, there will be no way to find a case for issue CALCITE-6850.
was:
When I try to find a case for CALCITE-6850, the result can not same as my mind
When I was building test cases for CALCITE-6850, I found that the results did not meet my expectations. When debugging the code, I discovered that the project's digest calculation did not include column names, This leads to the inability to correctly find the correct project during the findBestExp process.
debug picture:
!image-2025-02-22-17-19-46-706.png!
I think we need to add column names in computing project's degist like this:
{code:java}
// code now
protected int deepHashCode0() {
return Objects.hash(traitSet, input.deepHashCode(), exps, hints);
}
// should change to
protected int deepHashCode0() {
return Objects.hash(traitSet, input.deepHashCode(), rowType.getFieldNames(), exps, hints);
}{code}
This change will affect some cases and the results of these cases need to be fixed.
If calcite need this change, I can pull a pr. If this issue is not fixed, there will be no way to find a case for issue CALCITE-6850.
> Project's digest calculation error, should include FieldNames in rowType
> -------------------------------------------------------------------------
>
> Key: CALCITE-6852
> URL: https://issues.apache.org/jira/browse/CALCITE-6852
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.39.0
> Reporter: Zhen Chen
> Assignee: Zhen Chen
> Priority: Major
> Fix For: 1.39.0
>
> Attachments: image-2025-02-22-17-19-46-706.png
>
>
> When I was building test cases for CALCITE-6850, I found that the results did not meet my expectations. When debugging the code, I discovered that the project's digest calculation did not include column names, This leads to the inability to correctly find the correct project during the findBestExp process.
> debug picture:
> !image-2025-02-22-17-19-46-706.png!
> I think we need to add column names in computing project's degist like this:
> {code:java}
> // code now
> protected int deepHashCode0() {
> return Objects.hash(traitSet, input.deepHashCode(), exps, hints);
> }
> // should change to
> protected int deepHashCode0() {
> return Objects.hash(traitSet, input.deepHashCode(), rowType.getFieldNames(), exps, hints);
> }{code}
> This change will affect some cases and the results of these cases need to be fixed.
>
> If calcite need this change, I can pull a pr. If this issue is not fixed, there will be no way to find a case for issue CALCITE-6850.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)