Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-15596

Calcite. java.lang.Integer cannot be cast to java.lang.Long with JOIN and EXISTS.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • sql

    Description

      statement ok
      CREATE TABLE tbl(a TINYINT, b SMALLINT, c INTEGER, d BIGINT, e VARCHAR, f DATE, g TIMESTAMP)
      
      statement ok
      INSERT INTO tbl VALUES (1, 2, 3, 4, '5', DATE '1992-01-01', TIMESTAMP '1992-01-01 00:00:00')
      
      query I
      SELECT 1 FROM tbl t1 JOIN tbl t2 ON (t1.d=t2.d) WHERE EXISTS(SELECT t1.c FROM tbl t3 WHERE t1.d+t3.c<100 AND EXISTS(SELECT t2.f < DATE '2000-01-01'))
      ----
      1
      
      ../exists/test_complex_nested_correlated_subquery.test[_ignore]
      
      Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
      	at SC.execute(Unknown Source)
      	at org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl$BiPredicateImpl.test(ExpressionFactoryImpl.java:448)
      	at org.apache.ignite.internal.processors.query.calcite.exec.rel.NestedLoopJoinNode$InnerJoin.join(NestedLoopJoinNode.java:283)
      	at org.apache.ignite.internal.processors.query.calcite.exec.rel.NestedLoopJoinNode.endRight(NestedLoopJoinNode.java:194)
      

      Attachments

        Issue Links

          Activity

            People

              vladsz83 Vladimir Steshin
              zstan Evgeny Stanilovsky
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m