You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Stamatis Zampetakis (JIRA)" <ji...@apache.org> on 2019/04/16 12:42:00 UTC
[jira] [Resolved] (CALCITE-2994) Least restrictive type among
structs does not consider nullability
[ https://issues.apache.org/jira/browse/CALCITE-2994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stamatis Zampetakis resolved CALCITE-2994.
------------------------------------------
Resolution: Fixed
Fixed in [395aa85085e0dad1ba14d8761aeb79b2b11c3809|https://github.com/apache/calcite/commit/395aa85085e0dad1ba14d8761aeb79b2b11c3809]!
> Least restrictive type among structs does not consider nullability
> -------------------------------------------------------------------
>
> Key: CALCITE-2994
> URL: https://issues.apache.org/jira/browse/CALCITE-2994
> Project: Calcite
> Issue Type: Bug
> Reporter: Stamatis Zampetakis
> Assignee: Stamatis Zampetakis
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.20.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Consider the following high-level example:
> {code:sql}
> CREATE TYPE Coordinates AS (
> x INT,
> y INT);
> CREATE TABLE Address (
> loc1 Coordinates NOT NULL,
> loc2 Coordinates)
> {code}
> The least restrictive type between loc1 and loc2 is the type of loc2 (i.e., a nullable Coordinates type).
> The existing code (i.e., RelDataTypeFactory#leastRestrictive) does take into account nullability when the type is structured type (or row type).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)