Hi Zhe Hu,
   I remember there was a comparison-type configuration between char
and varchar. Can you check if 'shouldConvertRaggedUnionTypesToVarying'
has affected it?

Zhe Hu <[email protected]> 于2024年12月23日周一 08:48写道:
>
> Thank you, Mihai!
> I’ll take a look at how the implicit cast works here.
>
>
> Best regards
> ZheHu
>
> ---- Replied Message ----
> | From | Mihai Budiu<[email protected]> |
> | Date | 12/23/2024 03:32 |
> | To | [email protected]<[email protected]> |
> | Subject | Re: String comparison with DEFAULT conformance |
> I don't know if the SQL standard mandates a particular result for this query. 
> It depends on how type inference works. If both sides are cast to char(4), 
> then the result should be "true". If both sides are cast to VARCHAR, then the 
> result should be "false".
>
> Whether this is a bug or not depends really on what MySQL and Oracle do about 
> this query.
>
> Mihai
>
> ________________________________
> From: Zhe Hu <[email protected]>
> Sent: Friday, December 20, 2024 11:51 PM
> To: [email protected] <[email protected]>
> Subject: String comparison with DEFAULT conformance
>
> Hi, community!
> I’ve encountered one confusing problem when I run the following test in 
> JdbcTest with Calcite's DEFAULT conformance. It seems that expression
>    “cast('Eric' as char(4))='Eric    ‘“
> returns true.
> However, when I use MYSQL or ORACLE conformance, the above comparison returns 
> false.
>
>
> Is this intentional or a bug?
>
>
> Best regards,
> ZheHu
>
>
>

Reply via email to