[jira] [Commented] (PHOENIX-5937) Order by on nullable column sometimes filters rows

2020-06-29 Thread Hadoop QA (Jira)


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

Hadoop QA commented on PHOENIX-5937:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/13006661/PHOENIX-5937.master.v4.patch
  against master branch at commit e6fc80cf706518214c36a92189ab1c5dbb24a9ba.
  ATTACHMENT ID: 13006661

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 1 new 
or modified tests.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 lineLengths{color}.  The patch does not introduce lines 
longer than 100

 {color:red}-1 core tests{color}.  The patch failed these unit tests:
 
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.index.GlobalImmutableTxIndexIT
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.IndexToolForNonTxGlobalIndexIT
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.AlterMultiTenantTableWithViewsIT

Test results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4001//testReport/
Code Coverage results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4001//artifact/phoenix-core/target/site/jacoco/index.html
Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/4001//console

This message is automatically generated.

> Order by on nullable column sometimes filters rows
> --
>
> Key: PHOENIX-5937
> URL: https://issues.apache.org/jira/browse/PHOENIX-5937
> Project: Phoenix
>  Issue Type: Bug
>  Components: core
>Affects Versions: 4.x, master
>Reporter: Istvan Toth
>Assignee: Richard Antal
>Priority: Major
> Fix For: 5.1.0, 4.16.0
>
> Attachments: PHOENIX-5937.master.v1.patch, 
> PHOENIX-5937.master.v2.patch, PHOENIX-5937.master.v3.patch, 
> PHOENIX-5937.master.v4.patch
>
>
> When selecting using order by on a nullable column, the rows where the order 
> column is null are sometimes not returned.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (PHOENIX-5937) Order by on nullable column sometimes filters rows

2020-06-29 Thread Hudson (Jira)


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

Hudson commented on PHOENIX-5937:
-

FAILURE: Integrated in Jenkins build PreCommit-PHOENIX-Build #4002 (See 
[https://builds.apache.org/job/PreCommit-PHOENIX-Build/4002/])
PHOENIX-5937 Order by on nullable column sometimes filters rows (stoty: rev 
0bbe2faddce0b9b550a8efd558536bb03cfb133f)
* (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseOrderByIT.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java


> Order by on nullable column sometimes filters rows
> --
>
> Key: PHOENIX-5937
> URL: https://issues.apache.org/jira/browse/PHOENIX-5937
> Project: Phoenix
>  Issue Type: Bug
>  Components: core
>Affects Versions: 4.x, master
>Reporter: Istvan Toth
>Assignee: Richard Antal
>Priority: Major
> Fix For: 5.1.0, 4.16.0
>
> Attachments: PHOENIX-5937.master.v1.patch, 
> PHOENIX-5937.master.v2.patch, PHOENIX-5937.master.v3.patch, 
> PHOENIX-5937.master.v4.patch
>
>
> When selecting using order by on a nullable column, the rows where the order 
> column is null are sometimes not returned.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (PHOENIX-5937) Order by on nullable column sometimes filters rows

2020-06-29 Thread Richard Antal (Jira)


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

Richard Antal commented on PHOENIX-5937:


Thank you [~stoty] for for checking the patch. I have uploaded v4 right now, it 
fixes 1. 2.

I compared the following queries,
{code:java}
select * from SYSTEM.CATALOG where TABLE_NAME = 'US_POPULATION' order by 
ORDINAL_POSITION;
select COLUMN_NAME from SYSTEM.CATALOG where TABLE_NAME = 'US_POPULATION' order 
by ORDINAL_POSITION;{code}
And I found some difference in scan plan, debugged where the source of this 
difference is. 
In the BaseResultIterators line number 246-251 we add these empty key values to 
the scan, but it only happened in case of !projector.projectEverything() was 
true. (so the 2nd line)
Basically I just added an extra if statement for the given circumstances and 
copied the lines which modified the scan plan.

> Order by on nullable column sometimes filters rows
> --
>
> Key: PHOENIX-5937
> URL: https://issues.apache.org/jira/browse/PHOENIX-5937
> Project: Phoenix
>  Issue Type: Bug
>  Components: core
>Affects Versions: 4.x, master
>Reporter: Istvan Toth
>Assignee: Richard Antal
>Priority: Major
> Attachments: PHOENIX-5937.master.v1.patch, 
> PHOENIX-5937.master.v2.patch, PHOENIX-5937.master.v3.patch, 
> PHOENIX-5937.master.v4.patch
>
>
> When selecting using order by on a nullable column, the rows where the order 
> column is null are sometimes not returned.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (PHOENIX-5937) Order by on nullable column sometimes filters rows

2020-06-29 Thread Istvan Toth (Jira)


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

Istvan Toth commented on PHOENIX-5937:
--

+1 LGTM


> Order by on nullable column sometimes filters rows
> --
>
> Key: PHOENIX-5937
> URL: https://issues.apache.org/jira/browse/PHOENIX-5937
> Project: Phoenix
>  Issue Type: Bug
>  Components: core
>Affects Versions: 4.x, master
>Reporter: Istvan Toth
>Assignee: Richard Antal
>Priority: Major
> Attachments: PHOENIX-5937.master.v1.patch, 
> PHOENIX-5937.master.v2.patch, PHOENIX-5937.master.v3.patch, 
> PHOENIX-5937.master.v4.patch
>
>
> When selecting using order by on a nullable column, the rows where the order 
> column is null are sometimes not returned.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (PHOENIX-5937) Order by on nullable column sometimes filters rows

2020-06-29 Thread Istvan Toth (Jira)


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

Istvan Toth commented on PHOENIX-5937:
--

Thank you for digging into this, and the fix.

1. Nit: The indentation seems to be off

2. Not using Java 8 features would make backporting to 4.x easier, and the code 
more consistent

3. You have dug into the code deeply, and you added the specific circumstances 
that triggered the bug for me as a new else if branch.
I do not understand the whole context of this change. Could you explain how did 
you come to the conclusion that this is indeed the only case where this bug 
triggers ?

> Order by on nullable column sometimes filters rows
> --
>
> Key: PHOENIX-5937
> URL: https://issues.apache.org/jira/browse/PHOENIX-5937
> Project: Phoenix
>  Issue Type: Bug
>  Components: core
>Affects Versions: 4.x, master
>Reporter: Istvan Toth
>Assignee: Richard Antal
>Priority: Major
> Attachments: PHOENIX-5937.master.v1.patch, 
> PHOENIX-5937.master.v2.patch, PHOENIX-5937.master.v3.patch
>
>
> When selecting using order by on a nullable column, the rows where the order 
> column is null are sometimes not returned.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (PHOENIX-5937) Order by on nullable column sometimes filters rows

2020-06-12 Thread Hadoop QA (Jira)


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

Hadoop QA commented on PHOENIX-5937:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/13005540/PHOENIX-5937.master.v3.patch
  against master branch at commit 1080422e626c2451556dc4c3f66c6c0e1010693a.
  ATTACHMENT ID: 13005540

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 1 new 
or modified tests.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:red}-1 release audit{color}.  The applied patch generated 1 release 
audit warnings (more than the master's current 0 warnings).

{color:green}+1 lineLengths{color}.  The patch does not introduce lines 
longer than 100

 {color:red}-1 core tests{color}.  The patch failed these unit tests:
 

Test results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/3959//testReport/
Code Coverage results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/3959//artifact/phoenix-core/target/site/jacoco/index.html
Release audit warnings: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/3959//artifact/patchprocess/patchReleaseAuditWarnings.txt
Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/3959//console

This message is automatically generated.

> Order by on nullable column sometimes filters rows
> --
>
> Key: PHOENIX-5937
> URL: https://issues.apache.org/jira/browse/PHOENIX-5937
> Project: Phoenix
>  Issue Type: Bug
>  Components: core
>Affects Versions: 4.x, master
>Reporter: Istvan Toth
>Assignee: Richard Antal
>Priority: Major
> Attachments: PHOENIX-5937.master.v1.patch, 
> PHOENIX-5937.master.v2.patch, PHOENIX-5937.master.v3.patch
>
>
> When selecting using order by on a nullable column, the rows where the order 
> column is null are sometimes not returned.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (PHOENIX-5937) Order by on nullable column sometimes filters rows

2020-06-12 Thread Hadoop QA (Jira)


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

Hadoop QA commented on PHOENIX-5937:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/13005538/PHOENIX-5937.master.v2.patch
  against master branch at commit 1080422e626c2451556dc4c3f66c6c0e1010693a.
  ATTACHMENT ID: 13005538

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 1 new 
or modified tests.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 lineLengths{color}.  The patch does not introduce lines 
longer than 100

 {color:red}-1 core tests{color}.  The patch failed these unit tests:
 
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.AlterTableWithViewsIT
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.PermissionNSEnabledIT

Test results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/3958//testReport/
Code Coverage results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/3958//artifact/phoenix-core/target/site/jacoco/index.html
Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/3958//console

This message is automatically generated.

> Order by on nullable column sometimes filters rows
> --
>
> Key: PHOENIX-5937
> URL: https://issues.apache.org/jira/browse/PHOENIX-5937
> Project: Phoenix
>  Issue Type: Bug
>  Components: core
>Affects Versions: 4.x, master
>Reporter: Istvan Toth
>Assignee: Richard Antal
>Priority: Major
> Attachments: PHOENIX-5937.master.v1.patch, 
> PHOENIX-5937.master.v2.patch, PHOENIX-5937.master.v3.patch
>
>
> When selecting using order by on a nullable column, the rows where the order 
> column is null are sometimes not returned.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (PHOENIX-5937) Order by on nullable column sometimes filters rows

2020-06-12 Thread Richard Antal (Jira)


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

Richard Antal commented on PHOENIX-5937:


I retested the failing tests locally, they passed, Patch v2 fixes the line 
lengths.
Also I fixed release audit warning even it was in unrelated file added by 
PHOENIX-5884.

> Order by on nullable column sometimes filters rows
> --
>
> Key: PHOENIX-5937
> URL: https://issues.apache.org/jira/browse/PHOENIX-5937
> Project: Phoenix
>  Issue Type: Bug
>  Components: core
>Affects Versions: 4.x, master
>Reporter: Istvan Toth
>Assignee: Richard Antal
>Priority: Major
> Attachments: PHOENIX-5937.master.v1.patch, 
> PHOENIX-5937.master.v2.patch
>
>
> When selecting using order by on a nullable column, the rows where the order 
> column is null are sometimes not returned.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (PHOENIX-5937) Order by on nullable column sometimes filters rows

2020-06-11 Thread Hadoop QA (Jira)


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

Hadoop QA commented on PHOENIX-5937:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/13005482/PHOENIX-5937.master.v1.patch
  against master branch at commit 1080422e626c2451556dc4c3f66c6c0e1010693a.
  ATTACHMENT ID: 13005482

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 1 new 
or modified tests.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:red}-1 release audit{color}.  The applied patch generated 1 release 
audit warnings (more than the master's current 0 warnings).

{color:red}-1 lineLengths{color}.  The patch introduces the following lines 
longer than 100:
+System.out.println(rs.getString(1) +  ", " + 
rs.getString(2) +  ", " + rs.getString(3) +  ", " + rs.getString(4) +  ", " + 
rs.getString(5));
+.setSelectColumns(Lists.newArrayList("COLUMN_NAME, 
TENANT_ID, COLUMN_FAMILY, TABLE_NAME"))
+scan.addColumn(ecf, 
EncodedColumnsUtil.getEmptyKeyValueInfo(table).getFirst());

 {color:red}-1 core tests{color}.  The patch failed these unit tests:
 
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.index.AlterIndexIT

 {color:red}-1 core zombie tests{color}.  There are 7 zombie test(s):   
at 
org.apache.phoenix.end2end.EmptyColumnIT.testWhenTableWithIndexAndVariousOptions(EmptyColumnIT.java:492)
at 
org.apache.phoenix.end2end.InListIT.testWithIntegerTypesWithVariedSaltingAndTenancy(InListIT.java:212)
at 
org.apache.phoenix.end2end.InListIT.testLeadingRVCWithTrailingPKPartiallyQualifiedEnd(InListIT.java:378)

Test results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/3954//testReport/
Code Coverage results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/3954//artifact/phoenix-core/target/site/jacoco/index.html
Release audit warnings: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/3954//artifact/patchprocess/patchReleaseAuditWarnings.txt
Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/3954//console

This message is automatically generated.

> Order by on nullable column sometimes filters rows
> --
>
> Key: PHOENIX-5937
> URL: https://issues.apache.org/jira/browse/PHOENIX-5937
> Project: Phoenix
>  Issue Type: Bug
>  Components: core
>Affects Versions: 4.x, master
>Reporter: Istvan Toth
>Assignee: Richard Antal
>Priority: Major
> Attachments: PHOENIX-5937.master.v1.patch
>
>
> When selecting using order by on a nullable column, the rows where the order 
> column is null are sometimes not returned.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (PHOENIX-5937) Order by on nullable column sometimes filters rows

2020-06-04 Thread Istvan Toth (Jira)


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

Istvan Toth commented on PHOENIX-5937:
--

{noformat}
 
0: jdbc:phoenix:localhost:53265> CREATE TABLE IF NOT EXISTS us_population (
. . . . . . . . . . . . . . . )>   state CHAR(2) NOT NULL,
. . . . . . . . . . . . . . . )>   city VARCHAR NOT NULL,
. . . . . . . . . . . . . . . )>   population BIGINT
. . . . . . . . . . . . . . . )>   CONSTRAINT my_pk PRIMARY KEY (state, 
city));
No rows affected (0.013 seconds)
0: jdbc:phoenix:localhost:53265> select * from SYSTEM.CATALOG where TABLE_NAME 
= 'US_POPULATION';
+---+-+---+-+---+---+
| TENANT_ID | TABLE_SCHEM |  TABLE_NAME   | COLUMN_NAME | COLUMN_FAMILY | TABLE 
|
+---+-+---+-+---+---+
|   | | US_POPULATION | |   | 0 
|
|   | | US_POPULATION | | 0 | null  
|
|   | | US_POPULATION | CITY|   | null  
|
|   | | US_POPULATION | POPULATION  | 0 | null  
|
|   | | US_POPULATION | STATE   |   | null  
|
+---+-+---+-+---+---+
5 rows selected (0.035 seconds)
0: jdbc:phoenix:localhost:53265> select * from SYSTEM.CATALOG where TABLE_NAME 
= 'US_POPULATION' order by ORDINAL_POSITION;
+---+-+---+-+---+---+
| TENANT_ID | TABLE_SCHEM |  TABLE_NAME   | COLUMN_NAME | COLUMN_FAMILY | TABLE 
|
+---+-+---+-+---+---+
|   | | US_POPULATION | STATE   |   | null  
|
|   | | US_POPULATION | CITY|   | null  
|
|   | | US_POPULATION | POPULATION  | 0 | null  
|
+---+-+---+-+---+---+
3 rows selected (0.019 seconds)
0: jdbc:phoenix:localhost:53265> select COLUMN_NAME from SYSTEM.CATALOG where 
TABLE_NAME = 'US_POPULATION' order by ORDINAL_POSITION;;
+-+
| COLUMN_NAME |
+-+
| |
| |
| STATE   |
| CITY|
| POPULATION  |
+-+
5 rows selected (0.017 seconds)

{noformat}
The table has actually 5 rows.

Adding the "order by" filters the result to three rows (only where the 
ORIDNAL_POSITIOSN is not null) - BAD

However, specifying a column in the select again gives the correct result. - 
GOOD

 

> Order by on nullable column sometimes filters rows
> --
>
> Key: PHOENIX-5937
> URL: https://issues.apache.org/jira/browse/PHOENIX-5937
> Project: Phoenix
>  Issue Type: Bug
>  Components: core
>Affects Versions: 4.x, master
>Reporter: Istvan Toth
>Priority: Major
>
> When selecting using order by on a nullable column, the rows where the order 
> column is null are sometimes not returned.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)