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 2020/09/21 22:46:00 UTC

[jira] [Resolved] (CALCITE-4271) RelBuilder.in should allow duplicate values

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

Julian Hyde resolved CALCITE-4271.
----------------------------------
    Fix Version/s: 1.26.0
       Resolution: Fixed

Fixed in [2acf3426e|https://github.com/apache/calcite/commit/2acf3426e5a9df85192d0dfb047a7c0cd7c335dd].

> RelBuilder.in should allow duplicate values
> -------------------------------------------
>
>                 Key: CALCITE-4271
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4271
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>            Priority: Major
>             Fix For: 1.26.0
>
>
> Currently, {{RelBuilder.in(e, constant(1), constant(2), constant(1))}} throws, as follows:
> {noformat}
> java.lang.IllegalArgumentException: Ranges may not overlap, but received [1..1] and [1..1]
> 	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:146)
> 	at com.google.common.collect.ImmutableRangeSet$Builder.add(ImmutableRangeSet.java:585)
> 	at org.apache.calcite.rex.RexBuilder.toSarg(RexBuilder.java:1374)
> 	at org.apache.calcite.rex.RexBuilder.makeIn(RexBuilder.java:1310)
> 	at org.apache.calcite.tools.RelBuilder.in(RelBuilder.java:612)
> {noformat}
> Since the SQL expression {{e IN (1, 2, 1)}} is valid, the corresponding call to {{RelBuilder.in}} should be valid also.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)