[jira] [Commented] (PHOENIX-4843) InListExpression toString() converts the values in the list to ASC sort order always

2018-09-24 Thread Hudson (JIRA)


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

Hudson commented on PHOENIX-4843:
-

FAILURE: Integrated in Jenkins build Phoenix-omid2 #89 (See 
[https://builds.apache.org/job/Phoenix-omid2/89/])
PHOENIX-4843 InListExpression toString() converts the values in the list 
(tdsilva: rev a2a30443b72a0078e9b31bc9a36aee0be72d6578)
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/expression/InListExpression.java
* (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java


> InListExpression toString() converts the values in the list to ASC sort order 
> always
> 
>
> Key: PHOENIX-4843
> URL: https://issues.apache.org/jira/browse/PHOENIX-4843
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Thomas D'Silva
>Assignee: Thomas D'Silva
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
> Attachments: PHOENIX-4843-v2.patch, PHOENIX-4843-v3.patch, 
> PHOENIX-4843-v4.patch, PHOENIX-4843-v5.patch, PHOENIX-4843.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (PHOENIX-4843) InListExpression toString() converts the values in the list to ASC sort order always

2018-08-13 Thread Hudson (JIRA)


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

Hudson commented on PHOENIX-4843:
-

FAILURE: Integrated in Jenkins build Phoenix-4.x-HBase-1.3 #184 (See 
[https://builds.apache.org/job/Phoenix-4.x-HBase-1.3/184/])
PHOENIX-4843 InListExpression toString() converts the values in the list 
(tdsilva: rev a2a30443b72a0078e9b31bc9a36aee0be72d6578)
* (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/expression/InListExpression.java


> InListExpression toString() converts the values in the list to ASC sort order 
> always
> 
>
> Key: PHOENIX-4843
> URL: https://issues.apache.org/jira/browse/PHOENIX-4843
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Thomas D'Silva
>Assignee: Thomas D'Silva
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
> Attachments: PHOENIX-4843-v2.patch, PHOENIX-4843-v3.patch, 
> PHOENIX-4843-v4.patch, PHOENIX-4843-v5.patch, PHOENIX-4843.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (PHOENIX-4843) InListExpression toString() converts the values in the list to ASC sort order always

2018-08-13 Thread Vincent Poon (JIRA)


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

Vincent Poon commented on PHOENIX-4843:
---

lgtm

> InListExpression toString() converts the values in the list to ASC sort order 
> always
> 
>
> Key: PHOENIX-4843
> URL: https://issues.apache.org/jira/browse/PHOENIX-4843
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Thomas D'Silva
>Assignee: Thomas D'Silva
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
> Attachments: PHOENIX-4843-v2.patch, PHOENIX-4843-v3.patch, 
> PHOENIX-4843-v4.patch, PHOENIX-4843-v5.patch, PHOENIX-4843.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (PHOENIX-4843) InListExpression toString() converts the values in the list to ASC sort order always

2018-08-11 Thread Thomas D'Silva (JIRA)


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

Thomas D'Silva commented on PHOENIX-4843:
-

Thanks [~jamestaylor], I have attached a v5 patch.

> InListExpression toString() converts the values in the list to ASC sort order 
> always
> 
>
> Key: PHOENIX-4843
> URL: https://issues.apache.org/jira/browse/PHOENIX-4843
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Thomas D'Silva
>Assignee: Thomas D'Silva
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
> Attachments: PHOENIX-4843-v2.patch, PHOENIX-4843-v3.patch, 
> PHOENIX-4843-v4.patch, PHOENIX-4843-v5.patch, PHOENIX-4843.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (PHOENIX-4843) InListExpression toString() converts the values in the list to ASC sort order always

2018-08-10 Thread Hadoop QA (JIRA)


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

Hadoop QA commented on PHOENIX-4843:


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

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

{color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

{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:red}-1 lineLengths{color}.  The patch introduces the following lines 
longer than 100:
+stmt.execute("CREATE VIEW IF NOT EXISTS " + tenantView + " AS 
SELECT * FROM " + fullViewName );
+viewConn.createStatement().execute("UPSERT INTO " + tenantView + 
"(CREATED_BY, CREATED_DATE, SYSTEM_MODSTAMP, MODEL, MILEAGE, MILES_DRIVEN, 
MAKE) VALUES ('005xx01Sv6o', 1532458254819, 1532458254819, 'a5', 23, 1, 
'AUDI')");
+viewConn.createStatement().execute("UPSERT INTO " + tenantView + 
"(CREATED_BY, CREATED_DATE, SYSTEM_MODSTAMP, MODEL, MILEAGE, MILES_DRIVEN, 
MAKE) VALUES ('005xx01Sv6o', 1532458254819, 1532458254819, 'a4', 27, 3, 
'AUDI')");
+viewConn.createStatement().execute("UPSERT INTO " + tenantView + 
"(CREATED_BY, CREATED_DATE, SYSTEM_MODSTAMP, MODEL, MILEAGE, MILES_DRIVEN, 
MAKE) VALUES ('005xx01Sv6o', 1532458254819, 1532458254819, '328i', 32, 
4, 'BMW')");
+ResultSet rs = stmt.executeQuery("SELECT Make, Model FROM " + 
tenantView + " WHERE MILEAGE IN (32, 27)");
+rs = stmt.executeQuery("SELECT Make, Model FROM " + tenantView + " 
WHERE MILES_DRIVEN IN (3, 4)");
+viewConn.createStatement().execute("DELETE FROM  " + tenantView + 
" WHERE MILEAGE IN (27, 32)");
+// if we have to invert the bytes create a copy so that the 
byte[] in the values set are not affected

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

Test results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/1975//testReport/
Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/1975//console

This message is automatically generated.

> InListExpression toString() converts the values in the list to ASC sort order 
> always
> 
>
> Key: PHOENIX-4843
> URL: https://issues.apache.org/jira/browse/PHOENIX-4843
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Thomas D'Silva
>Assignee: Thomas D'Silva
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
> Attachments: PHOENIX-4843-v2.patch, PHOENIX-4843-v3.patch, 
> PHOENIX-4843-v4.patch, PHOENIX-4843.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (PHOENIX-4843) InListExpression toString() converts the values in the list to ASC sort order always

2018-08-10 Thread Hadoop QA (JIRA)


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

Hadoop QA commented on PHOENIX-4843:


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

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

{color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

{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:red}-1 lineLengths{color}.  The patch introduces the following lines 
longer than 100:
+stmt.execute("CREATE VIEW IF NOT EXISTS " + tenantView + " AS 
SELECT * FROM " + fullViewName );
+viewConn.createStatement().execute("UPSERT INTO " + tenantView + 
"(CREATED_BY, CREATED_DATE, SYSTEM_MODSTAMP, MODEL, MILEAGE, MILES_DRIVEN, 
MAKE) VALUES ('005xx01Sv6o', 1532458254819, 1532458254819, 'a5', 23, 1, 
'AUDI')");
+viewConn.createStatement().execute("UPSERT INTO " + tenantView + 
"(CREATED_BY, CREATED_DATE, SYSTEM_MODSTAMP, MODEL, MILEAGE, MILES_DRIVEN, 
MAKE) VALUES ('005xx01Sv6o', 1532458254819, 1532458254819, 'a4', 27, 3, 
'AUDI')");
+viewConn.createStatement().execute("UPSERT INTO " + tenantView + 
"(CREATED_BY, CREATED_DATE, SYSTEM_MODSTAMP, MODEL, MILEAGE, MILES_DRIVEN, 
MAKE) VALUES ('005xx01Sv6o', 1532458254819, 1532458254819, '328i', 32, 
4, 'BMW')");
+ResultSet rs = stmt.executeQuery("SELECT Make, Model FROM " + 
tenantView + " WHERE MILEAGE IN (32, 27)");
+// if we are need to invert the bytes create a copy so that 
the byte[] in values are not affected

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

Test results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/1974//testReport/
Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/1974//console

This message is automatically generated.

> InListExpression toString() converts the values in the list to ASC sort order 
> always
> 
>
> Key: PHOENIX-4843
> URL: https://issues.apache.org/jira/browse/PHOENIX-4843
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Thomas D'Silva
>Assignee: Thomas D'Silva
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
> Attachments: PHOENIX-4843-v2.patch, PHOENIX-4843-v3.patch, 
> PHOENIX-4843-v4.patch, PHOENIX-4843.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (PHOENIX-4843) InListExpression toString() converts the values in the list to ASC sort order always

2018-08-10 Thread James Taylor (JIRA)


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

James Taylor commented on PHOENIX-4843:
---

Couple more thoughts, [~tdsilva]:
 * I don't think you need to copy the bytes. You just need to allocate a new 
ImmutableBytesWritable so that the original one doesn't change.
 * It doesn't look like you're using currValue in the toStringLiteral call.

How about something like this?
{code:java}
 PDataType type = firstChild.getDataType();
 StringBuilder buf = new StringBuilder(firstChild + " IN (");
 for (ImmutableBytesPtr value : values) {
 ImmutableBytesWritable currValue = value;
 if (firstChild.getSortOrder() != null && firstChild.getSortOrder() 
!= SortOrder.getDefault()) {
 currValue = new ImmutableBytesWritable(currValue);
 type.coerceBytes(currValue, type, firstChild.getSortOrder(), 
SortOrder.getDefault());
 }
 buf.append(type.toStringLiteral(currValue, null));
 buf.append(',');
{code}

> InListExpression toString() converts the values in the list to ASC sort order 
> always
> 
>
> Key: PHOENIX-4843
> URL: https://issues.apache.org/jira/browse/PHOENIX-4843
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Thomas D'Silva
>Assignee: Thomas D'Silva
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
> Attachments: PHOENIX-4843-v2.patch, PHOENIX-4843-v3.patch, 
> PHOENIX-4843-v4.patch, PHOENIX-4843.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (PHOENIX-4843) InListExpression toString() converts the values in the list to ASC sort order always

2018-08-10 Thread James Taylor (JIRA)


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

James Taylor commented on PHOENIX-4843:
---

Nasty bug - nice find, [~tdsilva]. Minor nit on the patch. Use 
ImmutableBytesWritable instead of ImmutableBytesPtr as the latter has a higher 
cost of computing and storing the hashcode which you don't need to produce the 
string.
{code:java}
 for (ImmutableBytesPtr value : values) {
+ImmutableBytesPtr currValue = value;
 if (firstChild.getSortOrder() != null) {
-type.coerceBytes(value, type, firstChild.getSortOrder(), 
SortOrder.getDefault());
+// if we are need to invert the bytes create a copy so that 
the byte[] in values are not affected
+if (!firstChild.getSortOrder().equals(SortOrder.getDefault())) 
{
+currValue = new ImmutableBytesPtr(value.copyBytes());
+}
+type.coerceBytes(currValue, type, firstChild.getSortOrder(),
+SortOrder.getDefault());
{code}

> InListExpression toString() converts the values in the list to ASC sort order 
> always
> 
>
> Key: PHOENIX-4843
> URL: https://issues.apache.org/jira/browse/PHOENIX-4843
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Thomas D'Silva
>Assignee: Thomas D'Silva
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
> Attachments: PHOENIX-4843-v2.patch, PHOENIX-4843-v3.patch, 
> PHOENIX-4843.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)