[ 
https://issues.apache.org/jira/browse/CALCITE-5986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17763228#comment-17763228
 ] 

Julian Hyde commented on CALCITE-5986:
--------------------------------------

I don't see any problem in {{enum SqlTypeName}}. This looks perfect:
{code}
  public static final List<SqlTypeName> INT_TYPES =
      ImmutableList.of(TINYINT, SMALLINT, INTEGER, BIGINT);

  public static final List<SqlTypeName> EXACT_TYPES =
      combine(INT_TYPES, ImmutableList.of(DECIMAL));

  public static final List<SqlTypeName> APPROX_TYPES =
      ImmutableList.of(FLOAT, REAL, DOUBLE);

  public static final List<SqlTypeName> NUMERIC_TYPES =
      combine(EXACT_TYPES, APPROX_TYPES);
{code}

> The SqlTypeFamily for FP types is incorrect
> -------------------------------------------
>
>                 Key: CALCITE-5986
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5986
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.35.0
>            Reporter: Mihai Budiu
>            Priority: Minor
>
> In SqlTypeFamily we have this code:
> {code:java}
> private static final Map<Integer, SqlTypeFamily> JDBC_TYPE_TO_FAMILY =
> ...
>           .put(Types.FLOAT, NUMERIC)
>           .put(Types.REAL, NUMERIC)
>           .put(Types.DOUBLE, NUMERIC)
> {code}
> But it looks to me like the type family should be APPROXIMATE_NUMERIC.
> This impacts the way RelToSqlConverter works, for instance.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to