[ https://issues.apache.org/jira/browse/CALCITE-4085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17150257#comment-17150257 ]
Danny Chen commented on CALCITE-4085: ------------------------------------- > The “RETURNS NULL ON NULL INPUT” property is a characteristic of a function, > not a type I actually agree with this point, at least, for current code, before or after you proposed modifications, for the SQL type , e.g. a nullable record type with non-nullable field does not has a clear semantic, it becomes clean when we bind the type to a specific language, e.g. the Java. So from the perspective of SQL, the current master code works correctly. For 1, i have no strong objections, let's see other's options. If it is a must for Flink, we should demonstrate that it is a must and the change deserves to push to Calcite. For 2, i have on idea what the different with Row type and Structure type, maybe [~zabetak] can give good explanation. > Improve nullability support for fields of structured type > --------------------------------------------------------- > > Key: CALCITE-4085 > URL: https://issues.apache.org/jira/browse/CALCITE-4085 > Project: Calcite > Issue Type: Improvement > Components: core > Reporter: Dawid Wysakowicz > Assignee: Dawid Wysakowicz > Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > As discussed in > https://lists.apache.org/thread.html/r602ac95fff23dd1ef974fb396df7be061ab861384ec42f5c57ce0bc2%40%3Cdev.calcite.apache.org%3E > I would like to change the way a type of a field of a record is derived at > couple of locations. This helps frameworks such as Apache Flink to build > support for nullable records with not null fields. > I suggest to change: > * SqlDotOperator#deriveType > * SqlItemOperator#inferReturnType > * AliasNamespace#validateImpl > * RexBuilder#makeFieldAccessInternal > * SqlValidatorImpl.DeriveTypeVisitor#visit(SqlIdentifier) -- This message was sent by Atlassian Jira (v8.3.4#803005)