phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajeshbabu Chintaguntla (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-2027) Subqueries with no data are raising IllegalStateException
Date Fri, 05 Jun 2015 03:04:38 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-2027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14573980#comment-14573980
] 

Rajeshbabu Chintaguntla commented on PHOENIX-2027:
--------------------------------------------------

Nice find [~ayingshu].
this problem can happen when there are no matching records to return right? 
Then it's better to initialize with empty byte array.

Patch looks good to me.
Here are minor suggestions: 
1) use EMPTY_PTR static member already defined.
{code}
+                this.keys.add(new ImmutableBytesWritable(new byte[0]));
{code}

2) it would be better to move the test case to SortMergeJoinIT because it's specific to sort
merge joins.


> Subqueries with no data are raising IllegalStateException
> ---------------------------------------------------------
>
>                 Key: PHOENIX-2027
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2027
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Alicia Ying Shu
>            Assignee: Alicia Ying Shu
>         Attachments: Phoenix-2027.patch
>
>
> 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)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message