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

Hudson commented on PHOENIX-1535:
---------------------------------

SUCCESS: Integrated in Phoenix-master #530 (See 
[https://builds.apache.org/job/Phoenix-master/530/])
PHOENIX-1535 Secondary local index casues Undefined column error with queries 
involving joins(Maryann Xue) (rajeshbabu: rev 
f9ca8816d6356b64368d3e1b2b34eee8696f8cc2)
* 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/GroupedAggregateRegionObserver.java
* 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/BaseScannerRegionObserver.java
* phoenix-core/src/main/java/org/apache/phoenix/compile/QueryCompiler.java
* phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
* 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/ScanRegionObserver.java
* 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
* phoenix-core/src/it/java/org/apache/phoenix/end2end/SubqueryIT.java
* phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java
* phoenix-core/src/it/java/org/apache/phoenix/end2end/SortMergeJoinIT.java
* phoenix-core/src/it/java/org/apache/phoenix/end2end/HashJoinIT.java


> Secondary local index casues Undefined column error with queries involving 
> joins
> --------------------------------------------------------------------------------
>
>                 Key: PHOENIX-1535
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1535
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.2
>         Environment: HBase 0.98.6; CDH-5.2.0-1.cdh5.2.0.p0.36
>            Reporter: Joyce Lau
>            Assignee: Maryann Xue
>             Fix For: 5.0.0, 4.3
>
>         Attachments: 1535.incomplete.patch, 1535.patch, 1535.v2.patch, 
> PHOENIX-1535.v3.patch, PHOENIX-1535.v4.patch
>
>
> Create 2 tables with a local index
> create table tab1 (col1 bigint, col2 bigint, col3 bigint, constraint pk_tab1 
> primary key (col1));
> create table tab2 (col1 bigint, col2 bigint, col3 bigint, constraint pk_tab1 
> primary key (col1));
> create local index ind_tab1 on tab1(col2);
> Executing a query with a condition on the local index column and select a 
> column not in the index results in an error:
> explain
> select tab1.col3
> from tab1 join tab2 on tab1.col1 = tab2.col1
> where tab1.col2 = 1
> =======
> Error: ERROR 504 (42703): Undefined column. columnName=0:COL3
> SQLState:  42703
> ErrorCode: 504
> =======
> Select * is ok:
> explain select tab1.* from tab1 where tab1.col2 = 1
> If I drop the local index, the first query runs successfully.



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

Reply via email to