[jira] [Commented] (PHOENIX-3917) RowProjector#getEstimatedRowByteSize() returns incorrect value

2017-06-09 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on PHOENIX-3917:
-

Github user bijugs closed the pull request at:

https://github.com/apache/phoenix/pull/257


> RowProjector#getEstimatedRowByteSize() returns incorrect value
> --
>
> Key: PHOENIX-3917
> URL: https://issues.apache.org/jira/browse/PHOENIX-3917
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Biju Nair
>Assignee: Biju Nair
>Priority: Minor
> Fix For: 4.11.0
>
> Attachments: PHOENIX-3917_v2.patch, PHOENIX-3917_v3.patch
>
>
> {{queryPlan..getProjector().getEstimatedRowByteSize()}} returns "0" for a 
> query {{SELECT A_ID FROM TABLE}} where {{A_ID}} is Primary Key. Same is the 
> case for the query {{SELECT A_ID, A_DATA FROM TABLE}} where {{A_DATA}} is a 
> non key column. Assuming that the method is meant to return the estimated 
> number of bytes from the query projection the returned value of 0 is 
> incorrect.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (PHOENIX-3917) RowProjector#getEstimatedRowByteSize() returns incorrect value

2017-06-09 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on PHOENIX-3917:
-

Github user bijugs commented on the issue:

https://github.com/apache/phoenix/pull/257
  
Closing the PR since the Jira ticket got resolved.


> RowProjector#getEstimatedRowByteSize() returns incorrect value
> --
>
> Key: PHOENIX-3917
> URL: https://issues.apache.org/jira/browse/PHOENIX-3917
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Biju Nair
>Assignee: Biju Nair
>Priority: Minor
> Fix For: 4.11.0
>
> Attachments: PHOENIX-3917_v2.patch, PHOENIX-3917_v3.patch
>
>
> {{queryPlan..getProjector().getEstimatedRowByteSize()}} returns "0" for a 
> query {{SELECT A_ID FROM TABLE}} where {{A_ID}} is Primary Key. Same is the 
> case for the query {{SELECT A_ID, A_DATA FROM TABLE}} where {{A_DATA}} is a 
> non key column. Assuming that the method is meant to return the estimated 
> number of bytes from the query projection the returned value of 0 is 
> incorrect.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (PHOENIX-3917) RowProjector#getEstimatedRowByteSize() returns incorrect value

2017-06-09 Thread Hudson (JIRA)

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

Hudson commented on PHOENIX-3917:
-

FAILURE: Integrated in Jenkins build Phoenix-master #1653 (See 
[https://builds.apache.org/job/Phoenix-master/1653/])
PHOENIX-3917 RowProjector#getEstimatedRowByteSize() returns incorrect 
(jamestaylor: rev f46e9d0d043b9368b5662e2235104fb50e073ded)
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/compile/ProjectionCompiler.java


> RowProjector#getEstimatedRowByteSize() returns incorrect value
> --
>
> Key: PHOENIX-3917
> URL: https://issues.apache.org/jira/browse/PHOENIX-3917
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Biju Nair
>Assignee: Biju Nair
>Priority: Minor
> Attachments: PHOENIX-3917_v2.patch, PHOENIX-3917_v3.patch
>
>
> {{queryPlan..getProjector().getEstimatedRowByteSize()}} returns "0" for a 
> query {{SELECT A_ID FROM TABLE}} where {{A_ID}} is Primary Key. Same is the 
> case for the query {{SELECT A_ID, A_DATA FROM TABLE}} where {{A_DATA}} is a 
> non key column. Assuming that the method is meant to return the estimated 
> number of bytes from the query projection the returned value of 0 is 
> incorrect.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (PHOENIX-3917) RowProjector#getEstimatedRowByteSize() returns incorrect value

2017-06-09 Thread Samarth Jain (JIRA)

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

Samarth Jain commented on PHOENIX-3917:
---

+1

> RowProjector#getEstimatedRowByteSize() returns incorrect value
> --
>
> Key: PHOENIX-3917
> URL: https://issues.apache.org/jira/browse/PHOENIX-3917
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Biju Nair
>Assignee: Biju Nair
>Priority: Minor
> Attachments: PHOENIX-3917_v2.patch, PHOENIX-3917_v3.patch
>
>
> {{queryPlan..getProjector().getEstimatedRowByteSize()}} returns "0" for a 
> query {{SELECT A_ID FROM TABLE}} where {{A_ID}} is Primary Key. Same is the 
> case for the query {{SELECT A_ID, A_DATA FROM TABLE}} where {{A_DATA}} is a 
> non key column. Assuming that the method is meant to return the estimated 
> number of bytes from the query projection the returned value of 0 is 
> incorrect.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (PHOENIX-3917) RowProjector#getEstimatedRowByteSize() returns incorrect value

2017-06-08 Thread Hudson (JIRA)

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

Hudson commented on PHOENIX-3917:
-

FAILURE: Integrated in Jenkins build Phoenix-master #1650 (See 
[https://builds.apache.org/job/Phoenix-master/1650/])
Revert "PHOENIX-3917 RowProjector#getEstimatedRowByteSize() returns (samarth: 
rev 75401fcfc8c98f8894d49a66b96cd726d7aba925)
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/compile/ProjectionCompiler.java


> RowProjector#getEstimatedRowByteSize() returns incorrect value
> --
>
> Key: PHOENIX-3917
> URL: https://issues.apache.org/jira/browse/PHOENIX-3917
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Biju Nair
>Assignee: Biju Nair
>Priority: Minor
>
> {{queryPlan..getProjector().getEstimatedRowByteSize()}} returns "0" for a 
> query {{SELECT A_ID FROM TABLE}} where {{A_ID}} is Primary Key. Same is the 
> case for the query {{SELECT A_ID, A_DATA FROM TABLE}} where {{A_DATA}} is a 
> non key column. Assuming that the method is meant to return the estimated 
> number of bytes from the query projection the returned value of 0 is 
> incorrect.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (PHOENIX-3917) RowProjector#getEstimatedRowByteSize() returns incorrect value

2017-06-08 Thread Hudson (JIRA)

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

Hudson commented on PHOENIX-3917:
-

FAILURE: Integrated in Jenkins build Phoenix-master #1649 (See 
[https://builds.apache.org/job/Phoenix-master/1649/])
PHOENIX-3917 RowProjector#getEstimatedRowByteSize() returns incorrect (samarth: 
rev 402f99ddc82ac49020b2a871377d6aabf3f9fa72)
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/compile/ProjectionCompiler.java


> RowProjector#getEstimatedRowByteSize() returns incorrect value
> --
>
> Key: PHOENIX-3917
> URL: https://issues.apache.org/jira/browse/PHOENIX-3917
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Biju Nair
>Assignee: Biju Nair
>Priority: Minor
>
> {{queryPlan..getProjector().getEstimatedRowByteSize()}} returns "0" for a 
> query {{SELECT A_ID FROM TABLE}} where {{A_ID}} is Primary Key. Same is the 
> case for the query {{SELECT A_ID, A_DATA FROM TABLE}} where {{A_DATA}} is a 
> non key column. Assuming that the method is meant to return the estimated 
> number of bytes from the query projection the returned value of 0 is 
> incorrect.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (PHOENIX-3917) RowProjector#getEstimatedRowByteSize() returns incorrect value

2017-06-08 Thread Samarth Jain (JIRA)

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

Samarth Jain commented on PHOENIX-3917:
---

Looks like this change is causing test failures.

{code}
testCoveredColumnUpdates[MutableIndexIT_localIndex=true,transactional=true,columnEncoded=true](org.apache.phoenix.end2end.index.MutableIndexIT)
  Time elapsed: 5.984 sec  <<< ERROR!
org.apache.phoenix.schema.ColumnFamilyNotFoundException: ERROR 1001 (42I01): 
Undefined column family. familyName=B
at 
org.apache.phoenix.end2end.index.MutableIndexIT.testCoveredColumnUpdates(MutableIndexIT.java:186)

Tests run: 52, Failures: 0, Errors: 0, Skipped: 4, Time elapsed: 78.983 sec - 
in org.apache.phoenix.tx.ParameterizedTransactionIT
Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 129.269 sec - 
in org.apache.phoenix.tx.TxCheckpointIT
Tests run: 304, Failures: 0, Errors: 8, Skipped: 0, Time elapsed: 1,023.291 sec 
<<< FAILURE! - in org.apache.phoenix.end2end.index.IndexIT
testSelectCF[IndexIT_localIndex=true,mutable=false,transactional=false,columnEncoded=false](org.apache.phoenix.end2end.index.IndexIT)
  Time elapsed: 5.826 sec  <<< ERROR!
org.apache.phoenix.schema.ColumnFamilyNotFoundException: ERROR 1001 (42I01): 
Undefined column family. familyName=A
at 
org.apache.phoenix.end2end.index.IndexIT.testSelectCF(IndexIT.java:693)

testSelectCF[IndexIT_localIndex=true,mutable=false,transactional=false,columnEncoded=true](org.apache.phoenix.end2end.index.IndexIT)
  Time elapsed: 5.654 sec  <<< ERROR!
org.apache.phoenix.schema.ColumnFamilyNotFoundException: ERROR 1001 (42I01): 
Undefined column family. familyName=A
at 
org.apache.phoenix.end2end.index.IndexIT.testSelectCF(IndexIT.java:693)

testSelectCF[IndexIT_localIndex=true,mutable=false,transactional=true,columnEncoded=false](org.apache.phoenix.end2end.index.IndexIT)
  Time elapsed: 5.702 sec  <<< ERROR!
org.apache.phoenix.schema.ColumnFamilyNotFoundException: ERROR 1001 (42I01): 
Undefined column family. familyName=A
at 
org.apache.phoenix.end2end.index.IndexIT.testSelectCF(IndexIT.java:693)

testSelectCF[IndexIT_localIndex=true,mutable=false,transactional=true,columnEncoded=true](org.apache.phoenix.end2end.index.IndexIT)
  Time elapsed: 5.424 sec  <<< ERROR!
org.apache.phoenix.schema.ColumnFamilyNotFoundException: ERROR 1001 (42I01): 
Undefined column family. familyName=A
at 
org.apache.phoenix.end2end.index.IndexIT.testSelectCF(IndexIT.java:693)

testSelectCF[IndexIT_localIndex=true,mutable=true,transactional=false,columnEncoded=false](org.apache.phoenix.end2end.index.IndexIT)
  Time elapsed: 5.422 sec  <<< ERROR!
org.apache.phoenix.schema.ColumnFamilyNotFoundException: ERROR 1001 (42I01): 
Undefined column family. familyName=A
at 
org.apache.phoenix.end2end.index.IndexIT.testSelectCF(IndexIT.java:693)

testSelectCF[IndexIT_localIndex=true,mutable=true,transactional=false,columnEncoded=true](org.apache.phoenix.end2end.index.IndexIT)
  Time elapsed: 5.439 sec  <<< ERROR!
org.apache.phoenix.schema.ColumnFamilyNotFoundException: ERROR 1001 (42I01): 
Undefined column family. familyName=A
at 
org.apache.phoenix.end2end.index.IndexIT.testSelectCF(IndexIT.java:693)

testSelectCF[IndexIT_localIndex=true,mutable=true,transactional=true,columnEncoded=false](org.apache.phoenix.end2end.index.IndexIT)
  Time elapsed: 5.834 sec  <<< ERROR!
org.apache.phoenix.schema.ColumnFamilyNotFoundException: ERROR 1001 (42I01): 
Undefined column family. familyName=A
at 
org.apache.phoenix.end2end.index.IndexIT.testSelectCF(IndexIT.java:693)

testSelectCF[IndexIT_localIndex=true,mutable=true,transactional=true,columnEncoded=true](org.apache.phoenix.end2end.index.IndexIT)
  Time elapsed: 7.504 sec  <<< ERROR!
org.apache.phoenix.schema.ColumnFamilyNotFoundException: ERROR 1001 (42I01): 
Undefined column family. familyName=A
at 
org.apache.phoenix.end2end.index.IndexIT.testSelectCF(IndexIT.java:693)
{code}

 I will revert it for now since the overall effect of this change is minor. 
[~gsbiju], please take a look at these failures. We can target this in the next 
patch release.

> RowProjector#getEstimatedRowByteSize() returns incorrect value
> --
>
> Key: PHOENIX-3917
> URL: https://issues.apache.org/jira/browse/PHOENIX-3917
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Biju Nair
>Assignee: Biju Nair
>Priority: Minor
>
> {{queryPlan..getProjector().getEstimatedRowByteSize()}} returns "0" for a 
> query {{SELECT A_ID FROM TABLE}} where {{A_ID}} is Primary Key. Same is the 
> case for the query {{SELECT A_ID, A_DATA FROM TABLE}} where {{A_DATA}} is a 
> non key column. Assuming that the method is meant to return the estimated 
> number of bytes from the query 

[jira] [Commented] (PHOENIX-3917) RowProjector#getEstimatedRowByteSize() returns incorrect value

2017-06-08 Thread Biju Nair (JIRA)

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

Biju Nair commented on PHOENIX-3917:


Thanks [~ankit.singhal], [~samarthjain] for the review.

> RowProjector#getEstimatedRowByteSize() returns incorrect value
> --
>
> Key: PHOENIX-3917
> URL: https://issues.apache.org/jira/browse/PHOENIX-3917
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Biju Nair
>Assignee: Biju Nair
>Priority: Minor
>
> {{queryPlan..getProjector().getEstimatedRowByteSize()}} returns "0" for a 
> query {{SELECT A_ID FROM TABLE}} where {{A_ID}} is Primary Key. Same is the 
> case for the query {{SELECT A_ID, A_DATA FROM TABLE}} where {{A_DATA}} is a 
> non key column. Assuming that the method is meant to return the estimated 
> number of bytes from the query projection the returned value of 0 is 
> incorrect.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (PHOENIX-3917) RowProjector#getEstimatedRowByteSize() returns incorrect value

2017-06-07 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-3917:
---

[~samarthjain] - please review.

> RowProjector#getEstimatedRowByteSize() returns incorrect value
> --
>
> Key: PHOENIX-3917
> URL: https://issues.apache.org/jira/browse/PHOENIX-3917
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Biju Nair
>Assignee: Biju Nair
>Priority: Minor
>
> {{queryPlan..getProjector().getEstimatedRowByteSize()}} returns "0" for a 
> query {{SELECT A_ID FROM TABLE}} where {{A_ID}} is Primary Key. Same is the 
> case for the query {{SELECT A_ID, A_DATA FROM TABLE}} where {{A_DATA}} is a 
> non key column. Assuming that the method is meant to return the estimated 
> number of bytes from the query projection the returned value of 0 is 
> incorrect.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (PHOENIX-3917) RowProjector#getEstimatedRowByteSize() returns incorrect value

2017-06-07 Thread Ankit Singhal (JIRA)

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

Ankit Singhal commented on PHOENIX-3917:


Yes [~gsbiju], change make sense to me.

> RowProjector#getEstimatedRowByteSize() returns incorrect value
> --
>
> Key: PHOENIX-3917
> URL: https://issues.apache.org/jira/browse/PHOENIX-3917
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Biju Nair
>Priority: Minor
>
> {{queryPlan..getProjector().getEstimatedRowByteSize()}} returns "0" for a 
> query {{SELECT A_ID FROM TABLE}} where {{A_ID}} is Primary Key. Same is the 
> case for the query {{SELECT A_ID, A_DATA FROM TABLE}} where {{A_DATA}} is a 
> non key column. Assuming that the method is meant to return the estimated 
> number of bytes from the query projection the returned value of 0 is 
> incorrect.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (PHOENIX-3917) RowProjector#getEstimatedRowByteSize() returns incorrect value

2017-06-06 Thread Biju Nair (JIRA)

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

Biju Nair commented on PHOENIX-3917:


Looking through the code for {{ProjectionCompiler#compile}} where the 
projection size is calculated, looks the [logic to calculate the 
size|https://github.com/apache/phoenix/blob/e7629ca39224e7cbc49e8a7740ed96877a16df76/phoenix-core/src/main/java/org/apache/phoenix/compile/ProjectionCompiler.java#L471-L491]
 need to be moved a bit further after
{code}
if (isWildcard) {
projectAllColumnFamilies(table, scan);
} else {
isProjectEmptyKeyValue = where == null || 
LiteralExpression.isTrue(where) || where.requiresFinalEvaluation();
for (byte[] family : projectedFamilies) {
projectColumnFamily(table, scan, family);
}
}
{code}

Also if the column projected in the query is only the key column, the size of 
the key column need to be set to the estimated size of the {{RowProjector}}. 
After making the changes the size returned are 4 and 72 respectively for the 
queries mentioned in the description of this issue where both the columns 
{{A_ID}} and {{A_DATA}} are of the {{int}}. If this fix is correct let me know 
and I can provide a patch.

> RowProjector#getEstimatedRowByteSize() returns incorrect value
> --
>
> Key: PHOENIX-3917
> URL: https://issues.apache.org/jira/browse/PHOENIX-3917
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Biju Nair
>Priority: Minor
>
> {{queryPlan..getProjector().getEstimatedRowByteSize()}} returns "0" for a 
> query {{SELECT A_ID FROM TABLE}} where {{A_ID}} is Primary Key. Same is the 
> case for the query {{SELECT A_ID, A_DATA FROM TABLE}} where {{A_DATA}} is a 
> non key column. Assuming that the method is meant to return the estimated 
> number of bytes from the query projection the returned value of 0 is 
> incorrect.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)