[ https://issues.apache.org/jira/browse/CALCITE-6905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17937545#comment-17937545 ]
Alessandro Solimando edited comment on CALCITE-6905 at 3/22/25 5:34 AM: ------------------------------------------------------------------------ [~drugxander] thanks for reporting, can you share the plans for the query (original and optimized, if any?). I suspect there is a missing cast that type coercion failed to introduce at validation time. As it seems to be a regression if that was working in 1.38.0, it would be helpful if you could package that code into a test and use git bisect to find the offending commit. was (Author: asolimando): [~drugxander] thanks for reporting, can you share the plans for the query (original and optimized, if any?). I suspect there is a missing cast that type coercion failed to introduce at validation time. > Comparing string and int produce exception > ------------------------------------------ > > Key: CALCITE-6905 > URL: https://issues.apache.org/jira/browse/CALCITE-6905 > Project: Calcite > Issue Type: Bug > Affects Versions: 1.39.0 > Reporter: Alexander Drugov > Priority: Major > > With java class > {code:java} > public class Employee { > public String id > ... > }{code} > {code:sql} > select * from employees e where e.id = 1{code} > This query produce {_}java.lang.NoSuchMethodException: > org.apache.calcite.runtime.SqlFunctions.eq(java.lang.String, int){_}. But > this worked at 1.38 version. > > However I successfully can execute: > {code:sql} > with t as ( > select '123' id > ) > select id from t where id = 123 > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)