Vladimir Sitnikov created CALCITE-4309:
------------------------------------------

             Summary: Clarify org.apache.calcite.sql.type.SqlTypeName#getFamily 
nullability
                 Key: CALCITE-4309
                 URL: https://issues.apache.org/jira/browse/CALCITE-4309
             Project: Calcite
          Issue Type: Sub-task
          Components: core
    Affects Versions: 1.25.0
            Reporter: Vladimir Sitnikov


Currently {{SqlTypeFamily  SqlTypeName#getFamily()}} is nullable, and in 
practice, only the following enum members have null family:

{code:java}
  SYMBOL(PrecScale.NO_NO, true, Types.OTHER, null),
  DISTINCT(PrecScale.NO_NO, false, Types.DISTINCT, null),
  STRUCTURED(PrecScale.NO_NO, false, Types.STRUCT, null),
  ROW(PrecScale.NO_NO, false, Types.STRUCT, null),
  OTHER(PrecScale.NO_NO, false, Types.OTHER, null),
{code}

Should we replace {{null}} family with a non-null value?
Should we keep it as is and use `requireNonNull` when use-site expects a 
non-null value?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to