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

ReduceExpressionsRule throws "duplicate key" exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0-incubating
    • Component/s: None
    • Labels:
      None

      Description

      Hive's unit test that reproduces the problem: smb_mapjoin_25
      Stack Trace:
      java.lang.IllegalArgumentException: duplicate key: $1
      at com.google.common.base.Preconditions.checkArgument(Preconditions.java:119)
      at com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:67)
      at com.google.common.collect.ImmutableMap$Builder.fromEntryList(ImmutableMap.java:249)
      at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:235)
      at org.apache.calcite.rel.rules.ReduceExpressionsRule.predicateConstants(ReduceExpressionsRule.java:451)
      at org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressions(ReduceExpressionsRule.java:337)
      at org.apache.calcite.rel.rules.ReduceExpressionsRule$3.onMatch(ReduceExpressionsRule.java:223)

        Activity

        Hide
        julianhyde Julian Hyde added a comment -

        Closing now that 1.0.0-incubating has been released.

        Show
        julianhyde Julian Hyde added a comment - Closing now that 1.0.0-incubating has been released.
        Show
        julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/7f815c99 .
        Hide
        julianhyde Julian Hyde added a comment -

        I have reproduced this with a simple SQL query that constrains the same column twice:

        SELECT deptno FROM dept WHERE deptno = 10 AND deptno = 20
        Show
        julianhyde Julian Hyde added a comment - I have reproduced this with a simple SQL query that constrains the same column twice: SELECT deptno FROM dept WHERE deptno = 10 AND deptno = 20

          People

          • Assignee:
            julianhyde Julian Hyde
            Reporter:
            jpullokkaran Laljo John Pullokkaran
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development