You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "孟庆义(孟庆义)" <qi...@alibaba-inc.com> on 2015/03/07 05:09:30 UTC

re : And expression of primary key RVCs can not compile

Hi, taylor: 
  Phoenix 3.3 still has this issue
  I tried in two way:
    1, download release version 3.3 
    2, compile from branch 3.2
  

-----邮件原件-----
发件人: James Taylor [mailto:jamestaylor@apache.org] 
发送时间: 2015年3月7日 0:36
收件人: dev@phoenix.apache.org; 孟庆义(孟庆义)
主题: Re: And expression of primary key RVCs can not compile

Please try on Phoenix 3.3 as I suspect this is fixed.

On Friday, March 6, 2015, 孟庆义(孟庆义) <qi...@alibaba-inc.com> wrote:

> Dears:
>
>   1 . create table t (a integer not null, b integer not null, c 
> integer constrains pk primary key (a,b));
>
>   2. select c from t where a in (1,2) and b = 3 and (a,b) in ( (1,2) ,
> (1,3)
> );
>
>   I got exception on compile :
>
>   java.lang.IllegalArgumentException
>    at
> com.google.common.base.Preconditions.checkArgument(Preconditions.java:76)
>    at
>
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor$KeySlot
> .inter
> sect(WhereOptimizer.java:955)
>    at
>
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.interse
> ctSlot
> s(WhereOptimizer.java:506)
>    at
>
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.andKeyS
> lots(W
> hereOptimizer.java:551)
>    at
>
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLe
> ave(Wh
> ereOptimizer.java:725)
>    at
>
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLe
> ave(Wh
> ereOptimizer.java:349)
>    at
> org.apache.phoenix.expression.AndExpression.accept(AndExpression.java:100)
>    at
>
> org.apache.phoenix.compile.WhereOptimizer.pushKeyExpressionsToScan(Whe
> reOpti
> mizer.java:117)
>    at
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:105)
>    at
>
> org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompi
> ler.ja
> va:324)
>    at
> org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:132)
>    at
>
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.com
> pilePl
> an(PhoenixStatement.java:296)
>    at
>
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.com
> pilePl
> an(PhoenixStatement.java:284)
>    at
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:208)
>    at
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:204)
>    at
>
> org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExec
> utor.j
> ava:54)
>    at
>
> org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:
> 204)
>    at
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:967)
>    at sqlline.SqlLine$Commands.execute(SqlLine.java:3673)
>    at sqlline.SqlLine$Commands.sql(SqlLine.java:3584)
>    at sqlline.SqlLine.dispatch(SqlLine.java:821)
>    at sqlline.SqlLine.begin(SqlLine.java:699)
>    at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
>    at sqlline.SqlLine.main(SqlLine.java:424)
>
>
>
> Is this an known issue? I use phoenix3.0
>
>
>
> Daniel.meng
>
>
>
>


Re: re : And expression of primary key RVCs can not compile

Posted by James Taylor <ja...@apache.org>.
Thank you very much for reporting this. I've filed PHOENIX-1709 and
attached a patch. If you can let me know if the patch fixes the issue
at your end, that would be much appreciated. We'll make sure this
makes it into the next release.

    James

On Fri, Mar 6, 2015 at 8:09 PM, 孟庆义(孟庆义) <qi...@alibaba-inc.com> wrote:
> Hi, taylor:
>   Phoenix 3.3 still has this issue
>   I tried in two way:
>     1, download release version 3.3
>     2, compile from branch 3.2
>
>
> -----邮件原件-----
> 发件人: James Taylor [mailto:jamestaylor@apache.org]
> 发送时间: 2015年3月7日 0:36
> 收件人: dev@phoenix.apache.org; 孟庆义(孟庆义)
> 主题: Re: And expression of primary key RVCs can not compile
>
> Please try on Phoenix 3.3 as I suspect this is fixed.
>
> On Friday, March 6, 2015, 孟庆义(孟庆义) <qi...@alibaba-inc.com> wrote:
>
>> Dears:
>>
>>   1 . create table t (a integer not null, b integer not null, c
>> integer constrains pk primary key (a,b));
>>
>>   2. select c from t where a in (1,2) and b = 3 and (a,b) in ( (1,2) ,
>> (1,3)
>> );
>>
>>   I got exception on compile :
>>
>>   java.lang.IllegalArgumentException
>>    at
>> com.google.common.base.Preconditions.checkArgument(Preconditions.java:76)
>>    at
>>
>> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor$KeySlot
>> .inter
>> sect(WhereOptimizer.java:955)
>>    at
>>
>> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.interse
>> ctSlot
>> s(WhereOptimizer.java:506)
>>    at
>>
>> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.andKeyS
>> lots(W
>> hereOptimizer.java:551)
>>    at
>>
>> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLe
>> ave(Wh
>> ereOptimizer.java:725)
>>    at
>>
>> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLe
>> ave(Wh
>> ereOptimizer.java:349)
>>    at
>> org.apache.phoenix.expression.AndExpression.accept(AndExpression.java:100)
>>    at
>>
>> org.apache.phoenix.compile.WhereOptimizer.pushKeyExpressionsToScan(Whe
>> reOpti
>> mizer.java:117)
>>    at
>> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:105)
>>    at
>>
>> org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompi
>> ler.ja
>> va:324)
>>    at
>> org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:132)
>>    at
>>
>> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.com
>> pilePl
>> an(PhoenixStatement.java:296)
>>    at
>>
>> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.com
>> pilePl
>> an(PhoenixStatement.java:284)
>>    at
>> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:208)
>>    at
>> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:204)
>>    at
>>
>> org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExec
>> utor.j
>> ava:54)
>>    at
>>
>> org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:
>> 204)
>>    at
>> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:967)
>>    at sqlline.SqlLine$Commands.execute(SqlLine.java:3673)
>>    at sqlline.SqlLine$Commands.sql(SqlLine.java:3584)
>>    at sqlline.SqlLine.dispatch(SqlLine.java:821)
>>    at sqlline.SqlLine.begin(SqlLine.java:699)
>>    at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
>>    at sqlline.SqlLine.main(SqlLine.java:424)
>>
>>
>>
>> Is this an known issue? I use phoenix3.0
>>
>>
>>
>> Daniel.meng
>>
>>
>>
>>
>