Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4271

RelBuilder.in should allow duplicate values

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.26.0
    • None
    • None

    Description

      Currently, RelBuilder.in(e, constant(1), constant(2), constant(1)) throws, as follows:

      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)
      

      Since the SQL expression e IN (1, 2, 1) is valid, the corresponding call to RelBuilder.in should be valid also.

      Attachments

        Activity

          People

            julianhyde Julian Hyde
            julianhyde Julian Hyde
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: