[jira] [Commented] (PHOENIX-1478) Can't upsert value of 127 into column of type unsigned tinyint

2016-04-07 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-1478:
---

I've added Biju as a contributor and assigned this JIRA to him. FYI, you're a 
JIRA admin for Phoenix, so you can do everything I can, [~rajeshbabu].

> Can't upsert value of 127 into column of type unsigned tinyint
> --
>
> Key: PHOENIX-1478
> URL: https://issues.apache.org/jira/browse/PHOENIX-1478
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.2.0
>Reporter: Carter Shanklin
>Assignee: Biju Nair
>Priority: Minor
>  Labels: verify
> Fix For: 4.8.0
>
> Attachments: PHOENIX-1478-1.patch, PHOENIX-1478.patch
>
>
> The docs say values from 0 to 127 are valid. From sqlline I can upsert a 
> value of 126 but not 127. See below.
> {code}
> $ cat UnsignedTinyintFail.sql
> drop table if exists unsigned_tinyint_test;
> create table unsigned_tinyint_test (uti unsigned_tinyint primary key);
> upsert into unsigned_tinyint_test values (126);
> upsert into unsigned_tinyint_test values (127);
> {code}
> Results in:
> {code}
> Setting property: [isolation, TRANSACTION_READ_COMMITTED]
> Setting property: [run, UnsignedTinyintFail.sql]
> issuing: !connect jdbc:phoenix:localhost:2181:/hbase-unsecure none none 
> org.apache.phoenix.jdbc.PhoenixDriver
> Connecting to jdbc:phoenix:localhost:2181:/hbase-unsecure
> 14/11/15 08:19:57 WARN impl.MetricsConfig: Cannot locate configuration: tried 
> hadoop-metrics2-phoenix.properties,hadoop-metrics2.properties
> Connected to: Phoenix (version 4.2)
> Driver: PhoenixEmbeddedDriver (version 4.2)
> Autocommit status: true
> Transaction isolation: TRANSACTION_READ_COMMITTED
> Building list of tables and columns for tab-completion (set fastconnect to 
> true to skip)...
> 76/76 (100%) Done
> Done
> 1/4  drop table if exists unsigned_tinyint_test;
> No rows affected (0.015 seconds)
> 2/4  create table unsigned_tinyint_test (uti unsigned_tinyint primary 
> key);
> No rows affected (0.317 seconds)
> 3/4  upsert into unsigned_tinyint_test values (126);
> 1 row affected (0.032 seconds)
> 4/4  upsert into unsigned_tinyint_test values (127);
> Error: ERROR 203 (22005): Type mismatch. UNSIGNED_TINYINT and INTEGER for 127 
> (state=22005,code=203)
> org.apache.phoenix.schema.TypeMismatchException: ERROR 203 (22005): Type 
> mismatch. UNSIGNED_TINYINT and INTEGER for 127
>   at 
> org.apache.phoenix.schema.TypeMismatchException.newException(TypeMismatchException.java:52)
>   at 
> org.apache.phoenix.expression.LiteralExpression.newConstant(LiteralExpression.java:160)
>   at 
> org.apache.phoenix.expression.LiteralExpression.newConstant(LiteralExpression.java:136)
>   at 
> org.apache.phoenix.compile.UpsertCompiler$UpsertValuesCompiler.visit(UpsertCompiler.java:854)
>   at 
> org.apache.phoenix.compile.UpsertCompiler$UpsertValuesCompiler.visit(UpsertCompiler.java:830)
>   at 
> org.apache.phoenix.parse.LiteralParseNode.accept(LiteralParseNode.java:73)
>   at 
> org.apache.phoenix.compile.UpsertCompiler.compile(UpsertCompiler.java:721)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:467)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:458)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:259)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:252)
>   at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:250)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1037)
>   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.runCommands(SqlLine.java:1793)
>   at sqlline.SqlLine$Commands.run(SqlLine.java:4161)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at sqlline.SqlLine$ReflectiveCommandHandler.execute(SqlLine.java:2810)
>   at sqlline.SqlLine.dispatch(SqlLine.java:817)
>   at sqlline.SqlLine.initArgs(SqlLine.java:657)
>   at sqlline.SqlLine.begin(SqlLine.java:680)
>   at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java

[jira] [Commented] (PHOENIX-1478) Can't upsert value of 127 into column of type unsigned tinyint

2016-04-06 Thread Hudson (JIRA)

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

Hudson commented on PHOENIX-1478:
-

SUCCESS: Integrated in Phoenix-master #1185 (See 
[https://builds.apache.org/job/Phoenix-master/1185/])
PHOENIX-1478 Can't upsert value of 127 into column of type unsigned 
(rajeshbabu: rev 1e47821876af8100d5b4bc4dad03168eca7f5652)
* phoenix-core/src/main/java/org/apache/phoenix/schema/types/PInteger.java
* phoenix-core/src/main/java/org/apache/phoenix/schema/types/PDouble.java
* phoenix-core/src/main/java/org/apache/phoenix/schema/types/PLong.java
* phoenix-core/src/main/java/org/apache/phoenix/schema/types/PFloat.java


> Can't upsert value of 127 into column of type unsigned tinyint
> --
>
> Key: PHOENIX-1478
> URL: https://issues.apache.org/jira/browse/PHOENIX-1478
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.2.0
>Reporter: Carter Shanklin
>Priority: Minor
>  Labels: verify
> Fix For: 4.8.0
>
> Attachments: PHOENIX-1478-1.patch, PHOENIX-1478.patch
>
>
> The docs say values from 0 to 127 are valid. From sqlline I can upsert a 
> value of 126 but not 127. See below.
> {code}
> $ cat UnsignedTinyintFail.sql
> drop table if exists unsigned_tinyint_test;
> create table unsigned_tinyint_test (uti unsigned_tinyint primary key);
> upsert into unsigned_tinyint_test values (126);
> upsert into unsigned_tinyint_test values (127);
> {code}
> Results in:
> {code}
> Setting property: [isolation, TRANSACTION_READ_COMMITTED]
> Setting property: [run, UnsignedTinyintFail.sql]
> issuing: !connect jdbc:phoenix:localhost:2181:/hbase-unsecure none none 
> org.apache.phoenix.jdbc.PhoenixDriver
> Connecting to jdbc:phoenix:localhost:2181:/hbase-unsecure
> 14/11/15 08:19:57 WARN impl.MetricsConfig: Cannot locate configuration: tried 
> hadoop-metrics2-phoenix.properties,hadoop-metrics2.properties
> Connected to: Phoenix (version 4.2)
> Driver: PhoenixEmbeddedDriver (version 4.2)
> Autocommit status: true
> Transaction isolation: TRANSACTION_READ_COMMITTED
> Building list of tables and columns for tab-completion (set fastconnect to 
> true to skip)...
> 76/76 (100%) Done
> Done
> 1/4  drop table if exists unsigned_tinyint_test;
> No rows affected (0.015 seconds)
> 2/4  create table unsigned_tinyint_test (uti unsigned_tinyint primary 
> key);
> No rows affected (0.317 seconds)
> 3/4  upsert into unsigned_tinyint_test values (126);
> 1 row affected (0.032 seconds)
> 4/4  upsert into unsigned_tinyint_test values (127);
> Error: ERROR 203 (22005): Type mismatch. UNSIGNED_TINYINT and INTEGER for 127 
> (state=22005,code=203)
> org.apache.phoenix.schema.TypeMismatchException: ERROR 203 (22005): Type 
> mismatch. UNSIGNED_TINYINT and INTEGER for 127
>   at 
> org.apache.phoenix.schema.TypeMismatchException.newException(TypeMismatchException.java:52)
>   at 
> org.apache.phoenix.expression.LiteralExpression.newConstant(LiteralExpression.java:160)
>   at 
> org.apache.phoenix.expression.LiteralExpression.newConstant(LiteralExpression.java:136)
>   at 
> org.apache.phoenix.compile.UpsertCompiler$UpsertValuesCompiler.visit(UpsertCompiler.java:854)
>   at 
> org.apache.phoenix.compile.UpsertCompiler$UpsertValuesCompiler.visit(UpsertCompiler.java:830)
>   at 
> org.apache.phoenix.parse.LiteralParseNode.accept(LiteralParseNode.java:73)
>   at 
> org.apache.phoenix.compile.UpsertCompiler.compile(UpsertCompiler.java:721)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:467)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:458)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:259)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:252)
>   at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:250)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1037)
>   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.runCommands(SqlLine.java:1793)
>   at sqlline.SqlLine$Commands.run(SqlLine.java:4161)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.M

[jira] [Commented] (PHOENIX-1478) Can't upsert value of 127 into column of type unsigned tinyint

2016-03-29 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on PHOENIX-1478:


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

{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:red}-1 javadoc{color}.  The javadoc tool appears to have generated 
24 warning messages.

{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:green}+1 core tests{color}.  The patch passed unit tests in .

Test results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/290//testReport/
Javadoc warnings: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/290//artifact/patchprocess/patchJavadocWarnings.txt
Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/290//console

This message is automatically generated.

> Can't upsert value of 127 into column of type unsigned tinyint
> --
>
> Key: PHOENIX-1478
> URL: https://issues.apache.org/jira/browse/PHOENIX-1478
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.2.0
>Reporter: Carter Shanklin
>Priority: Minor
>  Labels: verify
> Fix For: 4.8.0
>
> Attachments: PHOENIX-1478-1.patch, PHOENIX-1478.patch
>
>
> The docs say values from 0 to 127 are valid. From sqlline I can upsert a 
> value of 126 but not 127. See below.
> {code}
> $ cat UnsignedTinyintFail.sql
> drop table if exists unsigned_tinyint_test;
> create table unsigned_tinyint_test (uti unsigned_tinyint primary key);
> upsert into unsigned_tinyint_test values (126);
> upsert into unsigned_tinyint_test values (127);
> {code}
> Results in:
> {code}
> Setting property: [isolation, TRANSACTION_READ_COMMITTED]
> Setting property: [run, UnsignedTinyintFail.sql]
> issuing: !connect jdbc:phoenix:localhost:2181:/hbase-unsecure none none 
> org.apache.phoenix.jdbc.PhoenixDriver
> Connecting to jdbc:phoenix:localhost:2181:/hbase-unsecure
> 14/11/15 08:19:57 WARN impl.MetricsConfig: Cannot locate configuration: tried 
> hadoop-metrics2-phoenix.properties,hadoop-metrics2.properties
> Connected to: Phoenix (version 4.2)
> Driver: PhoenixEmbeddedDriver (version 4.2)
> Autocommit status: true
> Transaction isolation: TRANSACTION_READ_COMMITTED
> Building list of tables and columns for tab-completion (set fastconnect to 
> true to skip)...
> 76/76 (100%) Done
> Done
> 1/4  drop table if exists unsigned_tinyint_test;
> No rows affected (0.015 seconds)
> 2/4  create table unsigned_tinyint_test (uti unsigned_tinyint primary 
> key);
> No rows affected (0.317 seconds)
> 3/4  upsert into unsigned_tinyint_test values (126);
> 1 row affected (0.032 seconds)
> 4/4  upsert into unsigned_tinyint_test values (127);
> Error: ERROR 203 (22005): Type mismatch. UNSIGNED_TINYINT and INTEGER for 127 
> (state=22005,code=203)
> org.apache.phoenix.schema.TypeMismatchException: ERROR 203 (22005): Type 
> mismatch. UNSIGNED_TINYINT and INTEGER for 127
>   at 
> org.apache.phoenix.schema.TypeMismatchException.newException(TypeMismatchException.java:52)
>   at 
> org.apache.phoenix.expression.LiteralExpression.newConstant(LiteralExpression.java:160)
>   at 
> org.apache.phoenix.expression.LiteralExpression.newConstant(LiteralExpression.java:136)
>   at 
> org.apache.phoenix.compile.UpsertCompiler$UpsertValuesCompiler.visit(UpsertCompiler.java:854)
>   at 
> org.apache.phoenix.compile.UpsertCompiler$UpsertValuesCompiler.visit(UpsertCompiler.java:830)
>   at 
> org.apache.phoenix.parse.LiteralParseNode.accept(LiteralParseNode.java:73)
>   at 
> org.apache.phoenix.compile.UpsertCompiler.compile(UpsertCompiler.java:721)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:467)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:458)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatemen

[jira] [Commented] (PHOENIX-1478) Can't upsert value of 127 into column of type unsigned tinyint

2016-03-28 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-1478:
---

Thanks for the patch, [~gsbiju]. Might be worth making a quick pass to see if 
there are other comparisons against Integer, Long, Small MAX_VALUE that should 
change from < to <=.

> Can't upsert value of 127 into column of type unsigned tinyint
> --
>
> Key: PHOENIX-1478
> URL: https://issues.apache.org/jira/browse/PHOENIX-1478
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.2.0
>Reporter: Carter Shanklin
>Priority: Minor
>  Labels: verify
> Fix For: 4.8.0
>
> Attachments: PHOENIX-1478.patch
>
>
> The docs say values from 0 to 127 are valid. From sqlline I can upsert a 
> value of 126 but not 127. See below.
> {code}
> $ cat UnsignedTinyintFail.sql
> drop table if exists unsigned_tinyint_test;
> create table unsigned_tinyint_test (uti unsigned_tinyint primary key);
> upsert into unsigned_tinyint_test values (126);
> upsert into unsigned_tinyint_test values (127);
> {code}
> Results in:
> {code}
> Setting property: [isolation, TRANSACTION_READ_COMMITTED]
> Setting property: [run, UnsignedTinyintFail.sql]
> issuing: !connect jdbc:phoenix:localhost:2181:/hbase-unsecure none none 
> org.apache.phoenix.jdbc.PhoenixDriver
> Connecting to jdbc:phoenix:localhost:2181:/hbase-unsecure
> 14/11/15 08:19:57 WARN impl.MetricsConfig: Cannot locate configuration: tried 
> hadoop-metrics2-phoenix.properties,hadoop-metrics2.properties
> Connected to: Phoenix (version 4.2)
> Driver: PhoenixEmbeddedDriver (version 4.2)
> Autocommit status: true
> Transaction isolation: TRANSACTION_READ_COMMITTED
> Building list of tables and columns for tab-completion (set fastconnect to 
> true to skip)...
> 76/76 (100%) Done
> Done
> 1/4  drop table if exists unsigned_tinyint_test;
> No rows affected (0.015 seconds)
> 2/4  create table unsigned_tinyint_test (uti unsigned_tinyint primary 
> key);
> No rows affected (0.317 seconds)
> 3/4  upsert into unsigned_tinyint_test values (126);
> 1 row affected (0.032 seconds)
> 4/4  upsert into unsigned_tinyint_test values (127);
> Error: ERROR 203 (22005): Type mismatch. UNSIGNED_TINYINT and INTEGER for 127 
> (state=22005,code=203)
> org.apache.phoenix.schema.TypeMismatchException: ERROR 203 (22005): Type 
> mismatch. UNSIGNED_TINYINT and INTEGER for 127
>   at 
> org.apache.phoenix.schema.TypeMismatchException.newException(TypeMismatchException.java:52)
>   at 
> org.apache.phoenix.expression.LiteralExpression.newConstant(LiteralExpression.java:160)
>   at 
> org.apache.phoenix.expression.LiteralExpression.newConstant(LiteralExpression.java:136)
>   at 
> org.apache.phoenix.compile.UpsertCompiler$UpsertValuesCompiler.visit(UpsertCompiler.java:854)
>   at 
> org.apache.phoenix.compile.UpsertCompiler$UpsertValuesCompiler.visit(UpsertCompiler.java:830)
>   at 
> org.apache.phoenix.parse.LiteralParseNode.accept(LiteralParseNode.java:73)
>   at 
> org.apache.phoenix.compile.UpsertCompiler.compile(UpsertCompiler.java:721)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:467)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:458)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:259)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:252)
>   at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:250)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1037)
>   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.runCommands(SqlLine.java:1793)
>   at sqlline.SqlLine$Commands.run(SqlLine.java:4161)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at sqlline.SqlLine$ReflectiveCommandHandler.execute(SqlLine.java:2810)
>   at sqlline.SqlLine.dispatch(SqlLine.java:817)
>   at sqlline.SqlLine.initArgs(SqlLine.java:657)
>   at sqlline.SqlLine.begin(SqlLine.java:680)
>   at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
>   at sqlline.

[jira] [Commented] (PHOENIX-1478) Can't upsert value of 127 into column of type unsigned tinyint

2016-03-28 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on PHOENIX-1478:


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

{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:red}-1 javadoc{color}.  The javadoc tool appears to have generated 
24 warning messages.

{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:green}+1 core tests{color}.  The patch passed unit tests in .

 {color:red}-1 core zombie tests{color}.  There are 1 zombie test(s): 

Test results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/289//testReport/
Javadoc warnings: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/289//artifact/patchprocess/patchJavadocWarnings.txt
Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/289//console

This message is automatically generated.

> Can't upsert value of 127 into column of type unsigned tinyint
> --
>
> Key: PHOENIX-1478
> URL: https://issues.apache.org/jira/browse/PHOENIX-1478
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.2.0
>Reporter: Carter Shanklin
>Priority: Minor
>  Labels: verify
> Fix For: 4.8.0
>
> Attachments: PHOENIX-1478.patch
>
>
> The docs say values from 0 to 127 are valid. From sqlline I can upsert a 
> value of 126 but not 127. See below.
> {code}
> $ cat UnsignedTinyintFail.sql
> drop table if exists unsigned_tinyint_test;
> create table unsigned_tinyint_test (uti unsigned_tinyint primary key);
> upsert into unsigned_tinyint_test values (126);
> upsert into unsigned_tinyint_test values (127);
> {code}
> Results in:
> {code}
> Setting property: [isolation, TRANSACTION_READ_COMMITTED]
> Setting property: [run, UnsignedTinyintFail.sql]
> issuing: !connect jdbc:phoenix:localhost:2181:/hbase-unsecure none none 
> org.apache.phoenix.jdbc.PhoenixDriver
> Connecting to jdbc:phoenix:localhost:2181:/hbase-unsecure
> 14/11/15 08:19:57 WARN impl.MetricsConfig: Cannot locate configuration: tried 
> hadoop-metrics2-phoenix.properties,hadoop-metrics2.properties
> Connected to: Phoenix (version 4.2)
> Driver: PhoenixEmbeddedDriver (version 4.2)
> Autocommit status: true
> Transaction isolation: TRANSACTION_READ_COMMITTED
> Building list of tables and columns for tab-completion (set fastconnect to 
> true to skip)...
> 76/76 (100%) Done
> Done
> 1/4  drop table if exists unsigned_tinyint_test;
> No rows affected (0.015 seconds)
> 2/4  create table unsigned_tinyint_test (uti unsigned_tinyint primary 
> key);
> No rows affected (0.317 seconds)
> 3/4  upsert into unsigned_tinyint_test values (126);
> 1 row affected (0.032 seconds)
> 4/4  upsert into unsigned_tinyint_test values (127);
> Error: ERROR 203 (22005): Type mismatch. UNSIGNED_TINYINT and INTEGER for 127 
> (state=22005,code=203)
> org.apache.phoenix.schema.TypeMismatchException: ERROR 203 (22005): Type 
> mismatch. UNSIGNED_TINYINT and INTEGER for 127
>   at 
> org.apache.phoenix.schema.TypeMismatchException.newException(TypeMismatchException.java:52)
>   at 
> org.apache.phoenix.expression.LiteralExpression.newConstant(LiteralExpression.java:160)
>   at 
> org.apache.phoenix.expression.LiteralExpression.newConstant(LiteralExpression.java:136)
>   at 
> org.apache.phoenix.compile.UpsertCompiler$UpsertValuesCompiler.visit(UpsertCompiler.java:854)
>   at 
> org.apache.phoenix.compile.UpsertCompiler$UpsertValuesCompiler.visit(UpsertCompiler.java:830)
>   at 
> org.apache.phoenix.parse.LiteralParseNode.accept(LiteralParseNode.java:73)
>   at 
> org.apache.phoenix.compile.UpsertCompiler.compile(UpsertCompiler.java:721)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:467)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:458)
>

[jira] [Commented] (PHOENIX-1478) Can't upsert value of 127 into column of type unsigned tinyint

2016-03-28 Thread Rajeshbabu Chintaguntla (JIRA)

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

Rajeshbabu Chintaguntla commented on PHOENIX-1478:
--

+1 on the patch. Nice catch. Will commit it.

> Can't upsert value of 127 into column of type unsigned tinyint
> --
>
> Key: PHOENIX-1478
> URL: https://issues.apache.org/jira/browse/PHOENIX-1478
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.2.0
>Reporter: Carter Shanklin
>Priority: Minor
>  Labels: verify
> Fix For: 4.8.0
>
> Attachments: PHOENIX-1478.patch
>
>
> The docs say values from 0 to 127 are valid. From sqlline I can upsert a 
> value of 126 but not 127. See below.
> {code}
> $ cat UnsignedTinyintFail.sql
> drop table if exists unsigned_tinyint_test;
> create table unsigned_tinyint_test (uti unsigned_tinyint primary key);
> upsert into unsigned_tinyint_test values (126);
> upsert into unsigned_tinyint_test values (127);
> {code}
> Results in:
> {code}
> Setting property: [isolation, TRANSACTION_READ_COMMITTED]
> Setting property: [run, UnsignedTinyintFail.sql]
> issuing: !connect jdbc:phoenix:localhost:2181:/hbase-unsecure none none 
> org.apache.phoenix.jdbc.PhoenixDriver
> Connecting to jdbc:phoenix:localhost:2181:/hbase-unsecure
> 14/11/15 08:19:57 WARN impl.MetricsConfig: Cannot locate configuration: tried 
> hadoop-metrics2-phoenix.properties,hadoop-metrics2.properties
> Connected to: Phoenix (version 4.2)
> Driver: PhoenixEmbeddedDriver (version 4.2)
> Autocommit status: true
> Transaction isolation: TRANSACTION_READ_COMMITTED
> Building list of tables and columns for tab-completion (set fastconnect to 
> true to skip)...
> 76/76 (100%) Done
> Done
> 1/4  drop table if exists unsigned_tinyint_test;
> No rows affected (0.015 seconds)
> 2/4  create table unsigned_tinyint_test (uti unsigned_tinyint primary 
> key);
> No rows affected (0.317 seconds)
> 3/4  upsert into unsigned_tinyint_test values (126);
> 1 row affected (0.032 seconds)
> 4/4  upsert into unsigned_tinyint_test values (127);
> Error: ERROR 203 (22005): Type mismatch. UNSIGNED_TINYINT and INTEGER for 127 
> (state=22005,code=203)
> org.apache.phoenix.schema.TypeMismatchException: ERROR 203 (22005): Type 
> mismatch. UNSIGNED_TINYINT and INTEGER for 127
>   at 
> org.apache.phoenix.schema.TypeMismatchException.newException(TypeMismatchException.java:52)
>   at 
> org.apache.phoenix.expression.LiteralExpression.newConstant(LiteralExpression.java:160)
>   at 
> org.apache.phoenix.expression.LiteralExpression.newConstant(LiteralExpression.java:136)
>   at 
> org.apache.phoenix.compile.UpsertCompiler$UpsertValuesCompiler.visit(UpsertCompiler.java:854)
>   at 
> org.apache.phoenix.compile.UpsertCompiler$UpsertValuesCompiler.visit(UpsertCompiler.java:830)
>   at 
> org.apache.phoenix.parse.LiteralParseNode.accept(LiteralParseNode.java:73)
>   at 
> org.apache.phoenix.compile.UpsertCompiler.compile(UpsertCompiler.java:721)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:467)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:458)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:259)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:252)
>   at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:250)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1037)
>   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.runCommands(SqlLine.java:1793)
>   at sqlline.SqlLine$Commands.run(SqlLine.java:4161)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at sqlline.SqlLine$ReflectiveCommandHandler.execute(SqlLine.java:2810)
>   at sqlline.SqlLine.dispatch(SqlLine.java:817)
>   at sqlline.SqlLine.initArgs(SqlLine.java:657)
>   at sqlline.SqlLine.begin(SqlLine.java:680)
>   at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
>   at sqlline.SqlLine.main(SqlLine.java:424)
> Aborting command set because "force" is false and command failed: "upsert 
> int

[jira] [Commented] (PHOENIX-1478) Can't upsert value of 127 into column of type unsigned tinyint

2016-03-28 Thread Biju Nair (JIRA)

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

Biju Nair commented on PHOENIX-1478:


Some test results using the test table in the ticket discription

{noformat}
0: jdbc:phoenix:localhost:2181:/hbase> upsert into unsigned_tinyint_test values 
(127);
1 row affected (5.129 seconds)
0: jdbc:phoenix:localhost:2181:/hbase> upsert into unsigned_tinyint_test values 
(128);
Error: ERROR 203 (22005): Type mismatch. UNSIGNED_TINYINT and INTEGER for 128 
(state=22005,code=203)
{noformat}

> Can't upsert value of 127 into column of type unsigned tinyint
> --
>
> Key: PHOENIX-1478
> URL: https://issues.apache.org/jira/browse/PHOENIX-1478
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.2.0
>Reporter: Carter Shanklin
>Priority: Minor
>  Labels: verify
> Fix For: 4.8.0
>
> Attachments: PHOENIX-1478.patch
>
>
> The docs say values from 0 to 127 are valid. From sqlline I can upsert a 
> value of 126 but not 127. See below.
> {code}
> $ cat UnsignedTinyintFail.sql
> drop table if exists unsigned_tinyint_test;
> create table unsigned_tinyint_test (uti unsigned_tinyint primary key);
> upsert into unsigned_tinyint_test values (126);
> upsert into unsigned_tinyint_test values (127);
> {code}
> Results in:
> {code}
> Setting property: [isolation, TRANSACTION_READ_COMMITTED]
> Setting property: [run, UnsignedTinyintFail.sql]
> issuing: !connect jdbc:phoenix:localhost:2181:/hbase-unsecure none none 
> org.apache.phoenix.jdbc.PhoenixDriver
> Connecting to jdbc:phoenix:localhost:2181:/hbase-unsecure
> 14/11/15 08:19:57 WARN impl.MetricsConfig: Cannot locate configuration: tried 
> hadoop-metrics2-phoenix.properties,hadoop-metrics2.properties
> Connected to: Phoenix (version 4.2)
> Driver: PhoenixEmbeddedDriver (version 4.2)
> Autocommit status: true
> Transaction isolation: TRANSACTION_READ_COMMITTED
> Building list of tables and columns for tab-completion (set fastconnect to 
> true to skip)...
> 76/76 (100%) Done
> Done
> 1/4  drop table if exists unsigned_tinyint_test;
> No rows affected (0.015 seconds)
> 2/4  create table unsigned_tinyint_test (uti unsigned_tinyint primary 
> key);
> No rows affected (0.317 seconds)
> 3/4  upsert into unsigned_tinyint_test values (126);
> 1 row affected (0.032 seconds)
> 4/4  upsert into unsigned_tinyint_test values (127);
> Error: ERROR 203 (22005): Type mismatch. UNSIGNED_TINYINT and INTEGER for 127 
> (state=22005,code=203)
> org.apache.phoenix.schema.TypeMismatchException: ERROR 203 (22005): Type 
> mismatch. UNSIGNED_TINYINT and INTEGER for 127
>   at 
> org.apache.phoenix.schema.TypeMismatchException.newException(TypeMismatchException.java:52)
>   at 
> org.apache.phoenix.expression.LiteralExpression.newConstant(LiteralExpression.java:160)
>   at 
> org.apache.phoenix.expression.LiteralExpression.newConstant(LiteralExpression.java:136)
>   at 
> org.apache.phoenix.compile.UpsertCompiler$UpsertValuesCompiler.visit(UpsertCompiler.java:854)
>   at 
> org.apache.phoenix.compile.UpsertCompiler$UpsertValuesCompiler.visit(UpsertCompiler.java:830)
>   at 
> org.apache.phoenix.parse.LiteralParseNode.accept(LiteralParseNode.java:73)
>   at 
> org.apache.phoenix.compile.UpsertCompiler.compile(UpsertCompiler.java:721)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:467)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:458)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:259)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:252)
>   at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:250)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1037)
>   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.runCommands(SqlLine.java:1793)
>   at sqlline.SqlLine$Commands.run(SqlLine.java:4161)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at sqlline.SqlLine$ReflectiveCommandHandler.execute(SqlLine.java:2810)
>   at sqlline.SqlLine.dispatch(S