You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jing Zhang (Jira)" <ji...@apache.org> on 2021/11/26 02:21:00 UTC

[jira] [Updated] (CALCITE-4888) Fix type inferring when call RelBuilder.in with arguments that are different types.

     [ https://issues.apache.org/jira/browse/CALCITE-4888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jing Zhang updated CALCITE-4888:
--------------------------------
    Summary: Fix type inferring when call RelBuilder.in with arguments that are different types.  (was: Unify type inferring logical for Sarg RexLiteral)

> Fix type inferring when call RelBuilder.in with arguments that are different types.
> -----------------------------------------------------------------------------------
>
>                 Key: CALCITE-4888
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4888
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Jing Zhang
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: image-2021-11-23-10-31-05-137.png
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> A problem would occur when people call RelBuilder.in with arguments that are different types.
> If the types of the RelBuilder.in arguments are not compatible (e.g. INTEGER and BOOLEAN, or INTEGER and DATE) then RelBuilder should throw. There should be a test for that.
> If the types are similar but not the same (e.g. INTEGER and SMALLINT or CHAR(5) and CHAR(7)) what should be behavior be? RelBuilder should introduce casts to the least restrictive type.
> Please note that: the update does not directly affect user who are using SQL. It would only effect user who build RelNode or RexNode by RelBuilder.in or RexBuilder.makeIn.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)