You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2021/11/19 20:38:00 UTC
[jira] [Comment Edited] (CALCITE-4872) UNKNOWN SqlTypeName erroneously treated as NULL
[ https://issues.apache.org/jira/browse/CALCITE-4872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17446649#comment-17446649 ]
Julian Hyde edited comment on CALCITE-4872 at 11/19/21, 8:37 PM:
-----------------------------------------------------------------
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.
* As always, please add commits to the PR, don't amend or rebase.
* We recently changed the rules, so we don't need " (Will Noble)" at the end of the commit message.
was (Author: julianhyde):
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)