[
https://issues.apache.org/jira/browse/CALCITE-4872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17446649#comment-17446649
]
Julian Hyde commented on CALCITE-4872:
--------------------------------------
I've marked this 'fix in 1.29'. There is a PR that is already close to good
enough, and it should make it over the line.
[~wnoble], I've added some review comments.
Also:
* This is a new feature, not a bug fix. We are adding a new type. Therefore
explain what UNKNOWN type means.
* Add a row to 'Data types' table in reference.md. In a paragraph below,
explain that UNKNOWN is not available from SQL, and what are its uses and
quirks.
* Add a few lines to SqlOperatorBaseTest. E.g. how UNKNOWN operates in as an
argument to +, as a condition in CASE, as result in one branch of a CASE, how
it works in CAST.
> UNKNOWN SqlTypeName erroneously treated as NULL
> -----------------------------------------------
>
> Key: CALCITE-4872
> URL: https://issues.apache.org/jira/browse/CALCITE-4872
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: Will Noble
> Assignee: Will Noble
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.29.0
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> Call {{createWithNullability}} on an {{UnknownSqlType}} currently returns a
> {{NULL}} type. Furthermore, it's impossible to cast to unknown types,
> according to {{SqlTypeUtil.canCastFrom}}. This introduces a new
> {{SqlTypeName}} -- {{UNKNOWN}} -- which behaves like {{NULL}} in all ways
> except that it's no longer actually equal to {{NULL}}, and can always be cast
> to.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)