[jira] [Commented] (PHOENIX-1709) And expression of primary key RVCs can not compile

2015-03-12 Thread Hudson (JIRA)

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

Hudson commented on PHOENIX-1709:
-

SUCCESS: Integrated in Phoenix-3.0-hadoop1 #374 (See 
[https://builds.apache.org/job/Phoenix-3.0-hadoop1/374/])
PHOENIX-1709 And expression of primary key RVCs can not compile (jtaylor: rev 
0638650969690f68d046542d420bab25065a14bc)
* phoenix-core/src/main/java/org/apache/phoenix/schema/RowKeySchema.java
* phoenix-core/src/test/java/org/apache/phoenix/compile/WhereOptimizerTest.java
* phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java


> And expression of primary key RVCs can not compile
> --
>
> Key: PHOENIX-1709
> URL: https://issues.apache.org/jira/browse/PHOENIX-1709
> Project: Phoenix
>  Issue Type: Bug
>Reporter: James Taylor
>Assignee: James Taylor
> Fix For: 3.3.1, 4.3.1, 4.4
>
> Attachments: PHOENIX-1709.patch, PHOENIX-1709_v2.patch, 
> PHOENIX-1709_v3.patch, PHOENIX-1709_v4.patch, PHOENIX-1709_v5.patch
>
>
>   1 . create table t (a integer not null, b integer not null, c integer
> constraint 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.intersectSlot
> s(WhereOptimizer.java:506)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.andKeySlots(W
> hereOptimizer.java:551)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh
> ereOptimizer.java:725)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh
> ereOptimizer.java:349)
>at
> org.apache.phoenix.expression.AndExpression.accept(AndExpression.java:100)
>at
> org.apache.phoenix.compile.WhereOptimizer.pushKeyExpressionsToScan(WhereOpti
> mizer.java:117)
>at
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:105)
>at
> org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.ja
> va:324)
>at
> org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:132)
>at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl
> an(PhoenixStatement.java:296)
>at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl
> 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(PhoenixContextExecutor.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)



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


[jira] [Commented] (PHOENIX-1709) And expression of primary key RVCs can not compile

2015-03-10 Thread Samarth Jain (JIRA)

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

Samarth Jain commented on PHOENIX-1709:
---

+1 on getting this in for 4.3.1 as well.

> And expression of primary key RVCs can not compile
> --
>
> Key: PHOENIX-1709
> URL: https://issues.apache.org/jira/browse/PHOENIX-1709
> Project: Phoenix
>  Issue Type: Bug
>Reporter: James Taylor
>Assignee: James Taylor
> Fix For: 3.3.1, 4.4
>
> Attachments: PHOENIX-1709.patch, PHOENIX-1709_v2.patch, 
> PHOENIX-1709_v3.patch, PHOENIX-1709_v4.patch, PHOENIX-1709_v5.patch
>
>
>   1 . create table t (a integer not null, b integer not null, c integer
> constraint 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.intersectSlot
> s(WhereOptimizer.java:506)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.andKeySlots(W
> hereOptimizer.java:551)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh
> ereOptimizer.java:725)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh
> ereOptimizer.java:349)
>at
> org.apache.phoenix.expression.AndExpression.accept(AndExpression.java:100)
>at
> org.apache.phoenix.compile.WhereOptimizer.pushKeyExpressionsToScan(WhereOpti
> mizer.java:117)
>at
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:105)
>at
> org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.ja
> va:324)
>at
> org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:132)
>at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl
> an(PhoenixStatement.java:296)
>at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl
> 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(PhoenixContextExecutor.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)



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


[jira] [Commented] (PHOENIX-1709) And expression of primary key RVCs can not compile

2015-03-10 Thread Hudson (JIRA)

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

Hudson commented on PHOENIX-1709:
-

SUCCESS: Integrated in Phoenix-master #609 (See 
[https://builds.apache.org/job/Phoenix-master/609/])
PHOENIX-1709 And expression of primary key RVCs can not compile (jtaylor: rev 
dee6f9d3850e80ea6bb2bd9d002b4acba15750ea)
* phoenix-core/src/main/java/org/apache/phoenix/schema/RowKeySchema.java
* phoenix-core/src/test/java/org/apache/phoenix/compile/WhereOptimizerTest.java
* phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java


> And expression of primary key RVCs can not compile
> --
>
> Key: PHOENIX-1709
> URL: https://issues.apache.org/jira/browse/PHOENIX-1709
> Project: Phoenix
>  Issue Type: Bug
>Reporter: James Taylor
>Assignee: James Taylor
> Attachments: PHOENIX-1709.patch, PHOENIX-1709_v2.patch, 
> PHOENIX-1709_v3.patch, PHOENIX-1709_v4.patch, PHOENIX-1709_v5.patch
>
>
>   1 . create table t (a integer not null, b integer not null, c integer
> constraint 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.intersectSlot
> s(WhereOptimizer.java:506)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.andKeySlots(W
> hereOptimizer.java:551)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh
> ereOptimizer.java:725)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh
> ereOptimizer.java:349)
>at
> org.apache.phoenix.expression.AndExpression.accept(AndExpression.java:100)
>at
> org.apache.phoenix.compile.WhereOptimizer.pushKeyExpressionsToScan(WhereOpti
> mizer.java:117)
>at
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:105)
>at
> org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.ja
> va:324)
>at
> org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:132)
>at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl
> an(PhoenixStatement.java:296)
>at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl
> 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(PhoenixContextExecutor.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)



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


[jira] [Commented] (PHOENIX-1709) And expression of primary key RVCs can not compile

2015-03-10 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-1709:
---

[~samarthjain] - I'd like to get this bug fix into the 4.3 branch. Are you ok 
with that?

> And expression of primary key RVCs can not compile
> --
>
> Key: PHOENIX-1709
> URL: https://issues.apache.org/jira/browse/PHOENIX-1709
> Project: Phoenix
>  Issue Type: Bug
>Reporter: James Taylor
>Assignee: James Taylor
> Attachments: PHOENIX-1709.patch, PHOENIX-1709_v2.patch, 
> PHOENIX-1709_v3.patch, PHOENIX-1709_v4.patch, PHOENIX-1709_v5.patch
>
>
>   1 . create table t (a integer not null, b integer not null, c integer
> constraint 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.intersectSlot
> s(WhereOptimizer.java:506)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.andKeySlots(W
> hereOptimizer.java:551)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh
> ereOptimizer.java:725)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh
> ereOptimizer.java:349)
>at
> org.apache.phoenix.expression.AndExpression.accept(AndExpression.java:100)
>at
> org.apache.phoenix.compile.WhereOptimizer.pushKeyExpressionsToScan(WhereOpti
> mizer.java:117)
>at
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:105)
>at
> org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.ja
> va:324)
>at
> org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:132)
>at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl
> an(PhoenixStatement.java:296)
>at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl
> 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(PhoenixContextExecutor.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)



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


[jira] [Commented] (PHOENIX-1709) And expression of primary key RVCs can not compile

2015-03-10 Thread daniel meng (JIRA)

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

daniel meng commented on PHOENIX-1709:
--

it works fine for me, thanks~ [~jamestaylor]

> And expression of primary key RVCs can not compile
> --
>
> Key: PHOENIX-1709
> URL: https://issues.apache.org/jira/browse/PHOENIX-1709
> Project: Phoenix
>  Issue Type: Bug
>Reporter: James Taylor
>Assignee: James Taylor
> Attachments: PHOENIX-1709.patch, PHOENIX-1709_v2.patch, 
> PHOENIX-1709_v3.patch, PHOENIX-1709_v4.patch, PHOENIX-1709_v5.patch
>
>
>   1 . create table t (a integer not null, b integer not null, c integer
> constraint 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.intersectSlot
> s(WhereOptimizer.java:506)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.andKeySlots(W
> hereOptimizer.java:551)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh
> ereOptimizer.java:725)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh
> ereOptimizer.java:349)
>at
> org.apache.phoenix.expression.AndExpression.accept(AndExpression.java:100)
>at
> org.apache.phoenix.compile.WhereOptimizer.pushKeyExpressionsToScan(WhereOpti
> mizer.java:117)
>at
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:105)
>at
> org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.ja
> va:324)
>at
> org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:132)
>at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl
> an(PhoenixStatement.java:296)
>at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl
> 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(PhoenixContextExecutor.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)



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


[jira] [Commented] (PHOENIX-1709) And expression of primary key RVCs can not compile

2015-03-09 Thread daniel meng (JIRA)

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

daniel meng commented on PHOENIX-1709:
--

part(2) issue is:
 we have a RVC  (a,b) in ((2,3)) where a, b is primary key; then we get a 
lower bound of key range
 (0x80,0x00,0x00,0x02,0x80,0x00,0x00,0x03)
 Use RowKeySchema to iterator on the lower bound
 {code:java}
  schema.iterator(key,ptr); // above lower bound
  schema.next(ptr,position,key.length); // position is the primary key 
pos of "a"
  byte[] output = ByteUtil.copyKeyBytesIfNecessary(ptr);
 {code}
 output should be "0x80,0x00,0x00,0x02"
 but if table is multi-tenant and tenant column is not fixed length, output 
turn out to be  "0x00,0x00,0x02,0x80"
 you can see the first "0x80" is skipped
 
 

> And expression of primary key RVCs can not compile
> --
>
> Key: PHOENIX-1709
> URL: https://issues.apache.org/jira/browse/PHOENIX-1709
> Project: Phoenix
>  Issue Type: Bug
>Reporter: James Taylor
>Assignee: James Taylor
> Attachments: PHOENIX-1709.patch, PHOENIX-1709_v2.patch, 
> PHOENIX-1709_v3.patch, PHOENIX-1709_v4.patch
>
>
>   1 . create table t (a integer not null, b integer not null, c integer
> constraint 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.intersectSlot
> s(WhereOptimizer.java:506)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.andKeySlots(W
> hereOptimizer.java:551)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh
> ereOptimizer.java:725)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh
> ereOptimizer.java:349)
>at
> org.apache.phoenix.expression.AndExpression.accept(AndExpression.java:100)
>at
> org.apache.phoenix.compile.WhereOptimizer.pushKeyExpressionsToScan(WhereOpti
> mizer.java:117)
>at
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:105)
>at
> org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.ja
> va:324)
>at
> org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:132)
>at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl
> an(PhoenixStatement.java:296)
>at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl
> 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(PhoenixContextExecutor.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)



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


[jira] [Commented] (PHOENIX-1709) And expression of primary key RVCs can not compile

2015-03-09 Thread daniel meng (JIRA)

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

daniel meng commented on PHOENIX-1709:
--

hi,[~jamestaylor] after fix for part(1). u can run InListIT.java and it should 
fail on testOverlappingRVCAndPKPartialQualifiedBegin.
in this test, one case is creating a table with tenant column type to be 
varchar. it's where i find the part(2)

> And expression of primary key RVCs can not compile
> --
>
> Key: PHOENIX-1709
> URL: https://issues.apache.org/jira/browse/PHOENIX-1709
> Project: Phoenix
>  Issue Type: Bug
>Reporter: James Taylor
>Assignee: James Taylor
> Attachments: PHOENIX-1709.patch, PHOENIX-1709_v2.patch, 
> PHOENIX-1709_v3.patch, PHOENIX-1709_v4.patch
>
>
>   1 . create table t (a integer not null, b integer not null, c integer
> constraint 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.intersectSlot
> s(WhereOptimizer.java:506)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.andKeySlots(W
> hereOptimizer.java:551)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh
> ereOptimizer.java:725)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh
> ereOptimizer.java:349)
>at
> org.apache.phoenix.expression.AndExpression.accept(AndExpression.java:100)
>at
> org.apache.phoenix.compile.WhereOptimizer.pushKeyExpressionsToScan(WhereOpti
> mizer.java:117)
>at
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:105)
>at
> org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.ja
> va:324)
>at
> org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:132)
>at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl
> an(PhoenixStatement.java:296)
>at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl
> 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(PhoenixContextExecutor.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)



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


[jira] [Commented] (PHOENIX-1709) And expression of primary key RVCs can not compile

2015-03-08 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-1709:
---

Thanks, [~daniel.M]. Great work! Your fix for (1) is fine, but I'm worried your 
fix for (2) may be masking other issues (or might occur in other places in the 
code). Would it be possible for you to add a test for that where I've added 
mine - in WhereOptimizerTest.testAndWithRVC()? You can create multi-tenant 
tables and tenant specific connections in those tests - I think there are 
examples there or in QueryCompilerTest. I want to make sure no other issues are 
lurking.

> And expression of primary key RVCs can not compile
> --
>
> Key: PHOENIX-1709
> URL: https://issues.apache.org/jira/browse/PHOENIX-1709
> Project: Phoenix
>  Issue Type: Bug
>Reporter: James Taylor
>Assignee: James Taylor
> Attachments: PHOENIX-1709.patch, PHOENIX-1709_v2.patch, 
> PHOENIX-1709_v3.patch
>
>
>   1 . create table t (a integer not null, b integer not null, c integer
> constraint 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.intersectSlot
> s(WhereOptimizer.java:506)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.andKeySlots(W
> hereOptimizer.java:551)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh
> ereOptimizer.java:725)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh
> ereOptimizer.java:349)
>at
> org.apache.phoenix.expression.AndExpression.accept(AndExpression.java:100)
>at
> org.apache.phoenix.compile.WhereOptimizer.pushKeyExpressionsToScan(WhereOpti
> mizer.java:117)
>at
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:105)
>at
> org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.ja
> va:324)
>at
> org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:132)
>at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl
> an(PhoenixStatement.java:296)
>at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl
> 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(PhoenixContextExecutor.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)



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


[jira] [Commented] (PHOENIX-1709) And expression of primary key RVCs can not compile

2015-03-08 Thread daniel meng (JIRA)

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

daniel meng commented on PHOENIX-1709:
--

i find two issues after apply v2.patch
1. WHERE (pk1, pk2) IN ((1, 2), (2, 3)) AND pk2 = 4 will compile as FULL SCAN, 
but it should be DEGENERATE SCAN
2. when the table is a multi-tenant table and the tenant column data type is 
not fixed length. the RowKeySchema's iterator can not be use directly on 
iterating primary key RCVs. because the first next() will skip one byte for 
SEPERATOR.

i made a new v3.patch based on v2.patch

> And expression of primary key RVCs can not compile
> --
>
> Key: PHOENIX-1709
> URL: https://issues.apache.org/jira/browse/PHOENIX-1709
> Project: Phoenix
>  Issue Type: Bug
>Reporter: James Taylor
>Assignee: James Taylor
> Attachments: PHOENIX-1709.patch, PHOENIX-1709_v2.patch
>
>
>   1 . create table t (a integer not null, b integer not null, c integer
> constraint 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.intersectSlot
> s(WhereOptimizer.java:506)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.andKeySlots(W
> hereOptimizer.java:551)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh
> ereOptimizer.java:725)
>at
> org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh
> ereOptimizer.java:349)
>at
> org.apache.phoenix.expression.AndExpression.accept(AndExpression.java:100)
>at
> org.apache.phoenix.compile.WhereOptimizer.pushKeyExpressionsToScan(WhereOpti
> mizer.java:117)
>at
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:105)
>at
> org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.ja
> va:324)
>at
> org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:132)
>at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl
> an(PhoenixStatement.java:296)
>at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl
> 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(PhoenixContextExecutor.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)



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