[ https://issues.apache.org/jira/browse/CALCITE-5986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17763280#comment-17763280 ]
Julian Hyde edited comment on CALCITE-5986 at 9/8/23 10:43 PM: --------------------------------------------------------------- I saw your PR. * The "primary" and "secondary" concepts are very difficult to grasp. I think that the primary and secondary family methods in SqlTypeName need more documentation. * Do the methods both need to be nullable? Non-nullable results are much easier to work with. * I think that the getFamily method should be deprecated. * "The SqlTypeFamily for FP types is incorrect" doesn't seem ready for release notes * Convert the {{assert}}s to preconditions calls. * Can you add a test that does some sanity checks, e.g. every numeric type has a not-null secondary family? Every secondary family is one of (A, B, C). Every primary family is one of (X, Y, Z). was (Author: julianhyde): I saw your PR. * The "primary" and "secondary" concepts are very difficult to grasp. I think that the primary and secondary family methods in SqlTypeName need more documentation. * Do the methods both need to be nullable? * I think that the getFamily method should be deprecated. * "The SqlTypeFamily for FP types is incorrect" doesn't seem ready for release notes > 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 > Labels: pull-request-available > > 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)