Re: Question about SqlTypeUtil#equalSansNullability

2024-01-25 Thread Alessandro Solimando
Hi, not sure I get your question, the javadoc of the method [1] says : "Returns whether two types are equal, ignoring nullability." The two types you mentioned are not equal, hence it correctly returns false, but the method doesn't tell you if the cast is safe or not. >From what you ask, it

Question about SqlTypeUtil#equalSansNullability

2024-01-25 Thread P.F. ZHAN
Hi, devs. I have some confuse about the method SqlTypeUtil#equalSansNullability(org.apache.calcite.rel.type.RelDataType, org.apache.calcite.rel.type.RelDataType). For example, the RexCall is *(2, cast(5 as double)), so the first type is BasicSqlType( INTEGER), the second type is