Doesn't having two types help distinguish which type is in the source database 
for platforms that support both? A call to 
org.apache.calcite.sql.type.SqlTypeName#getNameForJdbcType would lose that 
distinction. I don't know offhand whether there are databases that require a 
CAST when converting from double to float. Would that be important to know 
before deciding?
-Paul
    On Thursday, October 26, 2023 at 02:02:50 PM EDT, Mihai Budiu 
<[email protected]> wrote:  
 
 Hello,

It turns out that there is a lot of confusion in Calcite about what FLOAT is.
I have filed an issue about it: 
https://issues.apache.org/jira/browse/CALCITE-6074

It seems that the intent is for FLOAT to be an exact alias of DOUBLE.
If that's the case, we can remove a lot of code and prevent further confusions 
by just removing FLOAT as a SqlTypeName and using DOUBLE everywhere starting in 
the parser. The situation is very similar with DECIMAL and NUMERIC.

This will also prevent a lot of bugs in third party code that uses Calcite, 
since they cannot misinterpret what FLOAT is.

If you agree that this is the right thing, I will submit a PR which marks FLOAT 
as @Deprecated and removes all its uses in the codebase.

Mihai

  

Reply via email to