Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-2027

Subqueries with no data are raising IllegalStateException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.5.0, 4.4.1
    • Labels:
      None

      Description

      SELECT /*+ USE_SORT_MERGE_JOIN */ * FROM (SELECT ID, BIG_ID, DATE_ID FROM LARGE_TABLE AS A WHERE (A.ID % 5) = 0) AS A INNER JOIN (SELECT SEC_ID, SEC_TINY_ID, SEC_UNSIG_FLOAT_ID FROM SECONDARY_LARGE_TABLE AS B WHERE (B.SEC_ID % 5) = 0) AS B ON A.ID=B.SEC_ID WHERE A.DATE_ID > ALL (SELECT SEC_DATE_ID FROM SECONDARY_LARGE_TABLE LIMIT 100) AND B.SEC_UNSIG_FLOAT_ID = ANY (SELECT sec_unsig_float_id FROM SECONDARY_LARGE_TABLE WHERE SEC_ID > ALL (SELECT MIN (ID) FROM GRAMMAR_TABLE WHERE UNSIG_ID IS NULL) AND SEC_UNSIG_ID < ANY (SELECT DISTINCT(UNSIG_ID) FROM LARGE_TABLE WHERE UNSIG_ID<2500) LIMIT 1000) AND A.ID < 10000;

      java.lang.IllegalStateException: Uninitialiized. Null constructor called w/o accompaying readFields invocation
      at org.apache.hadoop.hbase.io.ImmutableBytesWritable.get(ImmutableBytesWritable.java:96)
      at org.apache.phoenix.execute.SortMergeJoinPlan$JoinKey.set(SortMergeJoinPlan.java:503)
      at org.apache.phoenix.execute.SortMergeJoinPlan$BasicJoinIterator.advance(SortMergeJoinPlan.java:337)
      at org.apache.phoenix.execute.SortMergeJoinPlan$BasicJoinIterator.init(SortMergeJoinPlan.java:325)
      at org.apache.phoenix.execute.SortMergeJoinPlan$BasicJoinIterator.next(SortMergeJoinPlan.java:256)
      at org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:757)
      at sqlline.IncrementalRows.hasNext(IncrementalRows.java:62)
      at sqlline.AbstractOutputFormat.print(AbstractOutputFormat.java:30)
      at sqlline.SqlLine.print(SqlLine.java:1653)
      at sqlline.Commands.execute(Commands.java:833)
      at sqlline.Commands.sql(Commands.java:732)
      at sqlline.SqlLine.dispatch(SqlLine.java:808)
      at sqlline.SqlLine.runCommands(SqlLine.java:1711)
      at sqlline.Commands.run(Commands.java:1285)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
      at sqlline.SqlLine.dispatch(SqlLine.java:804)
      at sqlline.SqlLine.initArgs(SqlLine.java:613)
      at sqlline.SqlLine.begin(SqlLine.java:656)
      at sqlline.SqlLine.start(SqlLine.java:398)
      at sqlline.SqlLine.main(SqlLine.java:292)

        Attachments

        1. Phoenix-2027-v1.patch
          6 kB
          Alicia Ying Shu
        2. Phoenix-2027.patch
          3 kB
          Alicia Ying Shu

          Activity

            People

            • Assignee:
              aliciashu Alicia Ying Shu
              Reporter:
              aliciashu Alicia Ying Shu
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: