Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6131

select from view with "upper" and "in" list throws a ClassCastException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.1.3.3, 10.2.2.1, 10.3.3.1, 10.4.2.1, 10.5.3.2, 10.6.2.4, 10.7.1.4, 10.8.3.0, 10.9.1.0
    • Fix Version/s: 10.8.3.3, 10.9.2.2, 10.10.2.0, 10.11.1.1
    • Component/s: SQL
    • Labels:
      None
    • Environment:
      windows
    • Urgency:
      Normal
    • Issue & fix info:
      High Value Fix, Patch Available, Repro attached
    • Bug behavior facts:
      Crash, Seen in production

      Description

      the issue can be reproduced
      1. create table myTbl1 (name varchar(1000));
      2. create table myTbl2 (name varchar(1000));
      3. create view myView (name) as select t1.name from myTbl1 t1 union all select t2.name from myTbl2 t2;
      4. select name from myView where upper(name) in ('AA', 'BB');
      #4 failed with "org.apache.derby.impl.sql.compile.SimpleStringOperatorNode incompatible with org.apache.derby.impl.sql.compile.ColumnReference: java.lang.ClassCastException"

      If the view is created as "create myView (name) as select t1.name from myTbl1 t1", the query worked fine.

        Attachments

        1. derby-6131-patch.txt
          2 kB
          Mike Matrigali
        2. derby-6131-patch_2.txt
          13 kB
          Mike Matrigali

          Activity

            People

            • Assignee:
              mikem Mike Matrigali
              Reporter:
              rqu Rong Qu
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: