[ https://issues.apache.org/jira/browse/CALCITE-6409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17846118#comment-17846118 ]
Caican Cai edited comment on CALCITE-6409 at 5/14/24 12:26 AM: --------------------------------------------------------------- [~mbudiu] Maybe my description of this issue is unclear, so I'll summarize it. During my adaptation to NVL2, I used the SameOperandTypeChecker method. According to mihai, this is to check the comparability of parameters. However, I found that NVL2 (expr1, Boolean, Char) will report an error in Spark, but will not report an error in Calcite. I checked the SameOperandTypeChecker method and found that it was a problem with the isComparable method. According to the comments, this is to check the comparability between parameter types, so the Boolean and Char types in the isCompareable method are comparable. I don’t know if I understand it correctly. To be honest,I don’t quite understand the concept of comparability because I haven’t found any information about it. was (Author: JIRAUSER302115): [~mbudiu] Maybe my description of this issue is unclear, so I'll summarize it. During my adaptation to NVL2, I used the SameOperandTypeChecker method. According to mihai, this is to check the comparability of parameters. However, I found that NVL2 (expr1, Boolean, Char) will report an error in Spark, but will not report an error in Calcite. I checked the SameOperandTypeChecker method and found that it was a problem with the isComparable method. According to the comments, this is to check the comparability between parameter types, so the Boolean and Char types in the isCompareable method are comparable. I don’t know if I understand it correctly. To be honest, I don’t quite understand the concept of comparability because I haven’t found any information about it. > Char types and Boolean types are comparable > ------------------------------------------- > > Key: CALCITE-6409 > URL: https://issues.apache.org/jira/browse/CALCITE-6409 > Project: Calcite > Issue Type: Improvement > Components: core > Affects Versions: 1.37.0 > Reporter: Caican Cai > Priority: Critical > Fix For: 1.38.0 > > > In the SameOperandTypeChecker method, the char type and the boolean type are > comparable because of the call to the isComparable method. > Comparability of char types and boolean types returns true in the > isComparable method. > However, char types and Boolean types in Spark are incomparable. Does Calcite > have fixed standards here? -- This message was sent by Atlassian Jira (v8.20.10#820010)