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

Jinfeng Ni commented on CALCITE-672:
------------------------------------

Right. That's what my patch is doing : make sure "any" type is created as 
nullable, in stead of non-nullable in SqlUnresolvedFunction. 

Probably, the title of this JIRA is not precise. It should be "SQL any type 
should be created as nullable in various places when no nullability information 
is known". It's not the problem of ReldataTypeFactory.  RelDataTypeFactory has 
the capacity to create either nullabe or not nullable ANY type. 

> SQL "any" type should be created as nullable in RelDataTypeFactory. 
> --------------------------------------------------------------------
>
>                 Key: CALCITE-672
>                 URL: https://issues.apache.org/jira/browse/CALCITE-672
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Jinfeng Ni
>            Assignee: Julian Hyde
>
> Calcite uses SQL "any" type internally, when the type of an Rex expression is 
> not known precisely. By its name, "any" could mean nullable type, or 
> non-nullable type.  Therefore, it makes sense to create SQL "any" type as 
> nullable type.
> However, in the Calcite code, the nullability of "any" type is not set 
> consistently. For example, the SqlItemOperator would set "any" as nullable, 
> while SqlUnresolvedFunction will set "any" as non-nullable. 
> SQL "any" type is used extensively in Schema-less system like Drill, since 
> the exact SQL type would be determined in run-time only. Having an 
> inconsistent nullability through Calcite library will cause issues for a 
> schema-less system.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to