[jira] [Commented] (PHOENIX-3223) Add hadoop classpath to PQS classpath

2016-09-01 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-3223:
--

[~elserj] LGTM. Thanks.

> Add hadoop classpath to PQS classpath
> -
>
> Key: PHOENIX-3223
> URL: https://issues.apache.org/jira/browse/PHOENIX-3223
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Sergio Peleato
>Assignee: Josh Elser
> Fix For: 4.9.0, 4.8.1
>
>
> Follow-on from PHOENIX-2369: running on Microsoft's Azure Data Lake Store 
> nets some ClassNotFoundExceptions on the corresponding classes. The library 
> is available via the Hadoop installation, but we miss it because PQS isn't 
> adding the {{hadoop classpath}} like {{sqlline.py}} is (only 
> {{$HADOOP_CONF_DIR}}, oops).
> Alicia's patch on PHOENIX-2369 already did the calculation work to get the 
> classpath; just need to simply add it to PQS' classpath now.



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


[jira] [Resolved] (PHOENIX-3096) Explain command is raising an ArithmeticException

2016-07-26 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-3096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu resolved PHOENIX-3096.
--
Resolution: Won't Fix

> Explain command is raising an ArithmeticException
> -
>
> Key: PHOENIX-3096
> URL: https://issues.apache.org/jira/browse/PHOENIX-3096
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>
> EXPLAIN SELECT ID FROM GRAMMAR_TABLE FETCH NEXT 10 ROWS ONLY;
> 2016-07-18 
> 10:26:11,058|beaver.machine|INFO|22814|140039552661248|MainThread|java.lang.ArithmeticException:
>  / by zero
> 2016-07-18 
> 10:26:11,058|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.execute.ScanPlan.isSerial(ScanPlan.java:135)
> 2016-07-18 
> 10:26:11,058|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.execute.ScanPlan.buildResultIteratorFactory(ScanPlan.java:154)
> 2016-07-18 
> 10:26:11,058|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.execute.ScanPlan.(ScanPlan.java:89)
> 2016-07-18 
> 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.execute.ScanPlan.(ScanPlan.java:85)
> 2016-07-18 
> 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.compile.QueryCompiler.compileSingleFlatQuery(QueryCompiler.java:586)
> 2016-07-18 
> 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.java:510)
> 2016-07-18 
> 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.compile.QueryCompiler.compileSelect(QueryCompiler.java:205)
> 2016-07-18 
> 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:160)
> 2016-07-18 
> 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:404)
> 2016-07-18 
> 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:378)
> 2016-07-18 
> 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableExplainStatement.compilePlan(PhoenixStatement.java:463)
> 2016-07-18 
> 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableExplainStatement.compilePlan(PhoenixStatement.java:443)
> 2016-07-18 
> 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:271)
> 2016-07-18 
> 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:266)
> 2016-07-18 
> 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
> 2016-07-18 
> 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:265)
> 2016-07-18 
> 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1444)
> 2016-07-18 
> 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> sqlline.Commands.execute(Commands.java:822)
> 2016-07-18 
> 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> sqlline.Commands.sql(Commands.java:732)
> 2016-07-18 
> 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> sqlline.SqlLine.dispatch(SqlLine.java:808)
> 2016-07-18 
> 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> sqlline.SqlLine.runCommands(SqlLine.java:1711)
> 2016-07-18 
> 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> sqlline.Commands.run(Commands.java:1285)
> 2016-07-18 
> 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 2016-07-18 
> 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 2016-07-18 
> 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 2016-07-18 
> 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> java.lang.reflect.Method.invoke(Method.java:498)
> 2016-07-18 
> 10:26:11,063|beaver.machine|INFO|22814|140039552661248|

[jira] [Commented] (PHOENIX-3096) Explain command is raising an ArithmeticException

2016-07-26 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-3096:
--

The codes have been changed. No longer valid.

> Explain command is raising an ArithmeticException
> -
>
> Key: PHOENIX-3096
> URL: https://issues.apache.org/jira/browse/PHOENIX-3096
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>
> EXPLAIN SELECT ID FROM GRAMMAR_TABLE FETCH NEXT 10 ROWS ONLY;
> 2016-07-18 
> 10:26:11,058|beaver.machine|INFO|22814|140039552661248|MainThread|java.lang.ArithmeticException:
>  / by zero
> 2016-07-18 
> 10:26:11,058|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.execute.ScanPlan.isSerial(ScanPlan.java:135)
> 2016-07-18 
> 10:26:11,058|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.execute.ScanPlan.buildResultIteratorFactory(ScanPlan.java:154)
> 2016-07-18 
> 10:26:11,058|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.execute.ScanPlan.(ScanPlan.java:89)
> 2016-07-18 
> 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.execute.ScanPlan.(ScanPlan.java:85)
> 2016-07-18 
> 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.compile.QueryCompiler.compileSingleFlatQuery(QueryCompiler.java:586)
> 2016-07-18 
> 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.java:510)
> 2016-07-18 
> 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.compile.QueryCompiler.compileSelect(QueryCompiler.java:205)
> 2016-07-18 
> 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:160)
> 2016-07-18 
> 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:404)
> 2016-07-18 
> 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:378)
> 2016-07-18 
> 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableExplainStatement.compilePlan(PhoenixStatement.java:463)
> 2016-07-18 
> 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableExplainStatement.compilePlan(PhoenixStatement.java:443)
> 2016-07-18 
> 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:271)
> 2016-07-18 
> 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:266)
> 2016-07-18 
> 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
> 2016-07-18 
> 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:265)
> 2016-07-18 
> 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1444)
> 2016-07-18 
> 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> sqlline.Commands.execute(Commands.java:822)
> 2016-07-18 
> 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> sqlline.Commands.sql(Commands.java:732)
> 2016-07-18 
> 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> sqlline.SqlLine.dispatch(SqlLine.java:808)
> 2016-07-18 
> 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> sqlline.SqlLine.runCommands(SqlLine.java:1711)
> 2016-07-18 
> 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> sqlline.Commands.run(Commands.java:1285)
> 2016-07-18 
> 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 2016-07-18 
> 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 2016-07-18 
> 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 2016-07-18 
> 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
> java.lang.reflect.Method.invoke(Method.java:

[jira] [Created] (PHOENIX-3096) Explain command is raising an ArithmeticException

2016-07-18 Thread Alicia Ying Shu (JIRA)
Alicia Ying Shu created PHOENIX-3096:


 Summary: Explain command is raising an ArithmeticException
 Key: PHOENIX-3096
 URL: https://issues.apache.org/jira/browse/PHOENIX-3096
 Project: Phoenix
  Issue Type: Bug
Reporter: Alicia Ying Shu
Assignee: Alicia Ying Shu


EXPLAIN SELECT ID FROM GRAMMAR_TABLE FETCH NEXT 10 ROWS ONLY;
2016-07-18 
10:26:11,058|beaver.machine|INFO|22814|140039552661248|MainThread|java.lang.ArithmeticException:
 / by zero
2016-07-18 10:26:11,058|beaver.machine|INFO|22814|140039552661248|MainThread|at 
org.apache.phoenix.execute.ScanPlan.isSerial(ScanPlan.java:135)
2016-07-18 10:26:11,058|beaver.machine|INFO|22814|140039552661248|MainThread|at 
org.apache.phoenix.execute.ScanPlan.buildResultIteratorFactory(ScanPlan.java:154)
2016-07-18 10:26:11,058|beaver.machine|INFO|22814|140039552661248|MainThread|at 
org.apache.phoenix.execute.ScanPlan.(ScanPlan.java:89)
2016-07-18 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
org.apache.phoenix.execute.ScanPlan.(ScanPlan.java:85)
2016-07-18 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
org.apache.phoenix.compile.QueryCompiler.compileSingleFlatQuery(QueryCompiler.java:586)
2016-07-18 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.java:510)
2016-07-18 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
org.apache.phoenix.compile.QueryCompiler.compileSelect(QueryCompiler.java:205)
2016-07-18 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:160)
2016-07-18 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:404)
2016-07-18 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:378)
2016-07-18 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableExplainStatement.compilePlan(PhoenixStatement.java:463)
2016-07-18 10:26:11,059|beaver.machine|INFO|22814|140039552661248|MainThread|at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableExplainStatement.compilePlan(PhoenixStatement.java:443)
2016-07-18 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:271)
2016-07-18 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:266)
2016-07-18 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
2016-07-18 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:265)
2016-07-18 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1444)
2016-07-18 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
sqlline.Commands.execute(Commands.java:822)
2016-07-18 10:26:11,060|beaver.machine|INFO|22814|140039552661248|MainThread|at 
sqlline.Commands.sql(Commands.java:732)
2016-07-18 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
sqlline.SqlLine.dispatch(SqlLine.java:808)
2016-07-18 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
sqlline.SqlLine.runCommands(SqlLine.java:1711)
2016-07-18 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
sqlline.Commands.run(Commands.java:1285)
2016-07-18 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2016-07-18 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2016-07-18 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2016-07-18 10:26:11,061|beaver.machine|INFO|22814|140039552661248|MainThread|at 
java.lang.reflect.Method.invoke(Method.java:498)
2016-07-18 10:26:11,063|beaver.machine|INFO|22814|140039552661248|MainThread|at 
sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
2016-07-18 10:26:11,063|beaver.machine|INFO|22814|140039552661248|MainThread|at 
sqlline.SqlLine.dispatch(SqlLine.java:804)
2016-07-18 10:26:11,063|beaver.machine|INFO|22814|140039552661248|MainThread|at 
sqlline.SqlLine.initArgs(SqlLine.java:613)
2016-07-18 10:26:11,063|beaver.machine|INFO|22814|14

[jira] [Commented] (PHOENIX-3055) Fix a few resource leaks and null dereferences reported by Coverity

2016-07-06 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-3055:
--

Uploaded the patch.

> Fix a few resource leaks and null dereferences reported by Coverity
> ---
>
> Key: PHOENIX-3055
> URL: https://issues.apache.org/jira/browse/PHOENIX-3055
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.8.0
>
> Attachments: PHOENIX-3055.patch
>
>




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


[jira] [Updated] (PHOENIX-3055) Fix a few resource leaks and null dereferences reported by Coverity

2016-07-06 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-3055?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-3055:
-
Fix Version/s: 4.8.0

> Fix a few resource leaks and null dereferences reported by Coverity
> ---
>
> Key: PHOENIX-3055
> URL: https://issues.apache.org/jira/browse/PHOENIX-3055
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.8.0
>
> Attachments: PHOENIX-3055.patch
>
>




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


[jira] [Updated] (PHOENIX-3055) Fix a few resource leaks and null dereferences reported by Coverity

2016-07-06 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-3055?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-3055:
-
Attachment: PHOENIX-3055.patch

> Fix a few resource leaks and null dereferences reported by Coverity
> ---
>
> Key: PHOENIX-3055
> URL: https://issues.apache.org/jira/browse/PHOENIX-3055
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Attachments: PHOENIX-3055.patch
>
>




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


[jira] [Created] (PHOENIX-3055) Fix a few resource leaks and null dereferences reported by Coverity

2016-07-06 Thread Alicia Ying Shu (JIRA)
Alicia Ying Shu created PHOENIX-3055:


 Summary: Fix a few resource leaks and null dereferences reported 
by Coverity
 Key: PHOENIX-3055
 URL: https://issues.apache.org/jira/browse/PHOENIX-3055
 Project: Phoenix
  Issue Type: Bug
Reporter: Alicia Ying Shu
Assignee: Alicia Ying Shu
Priority: Minor






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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-29 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

[~elserj] Thanks!

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931-v2.patch, 
> PHOENIX-2931-v3.patch, PHOENIX-2931-v4.patch, PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-24 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

Thanks. Uploaded revised patch

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.9.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931-v2.patch, 
> PHOENIX-2931-v3.patch, PHOENIX-2931-v4.patch, PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Updated] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-24 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2931:
-
Attachment: PHOENIX-2931-v4.patch

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.9.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931-v2.patch, 
> PHOENIX-2931-v3.patch, PHOENIX-2931-v4.patch, PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Updated] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-24 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2931:
-
Attachment: (was: PHOENIX-2931-v4.patch)

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.9.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931-v2.patch, 
> PHOENIX-2931-v3.patch, PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-24 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

[~elserj] Thanks for the review. No need to use $. I followed the existing 
multi-line style. Tried other ways but this gives me the best format. Changed 
to use sys.exit(-1).  
{code}
+usageError("At least one input file must be supplied", 
options);
{code}
It is for psql command line that users need to have at least one input file and 
connection string is not required. It would be printed on the screen. 

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.9.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931-v2.patch, 
> PHOENIX-2931-v3.patch, PHOENIX-2931-v4.patch, PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-23 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

[~enis] Thanks for the review! Uploaded a patch

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.9.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931-v2.patch, 
> PHOENIX-2931-v3.patch, PHOENIX-2931-v4.patch, PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Updated] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-23 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2931:
-
Attachment: PHOENIX-2931-v4.patch

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.9.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931-v2.patch, 
> PHOENIX-2931-v3.patch, PHOENIX-2931-v4.patch, PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-23 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

[~enis] Go through the parsing again is a sanity check to make sure the 
specifications of the connection information are correct. It is helpful. I 
think we should keep. As for the principal and keytab, very likely users will 
not put them in hbase-site.xml for security reasons. 

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.9.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931-v2.patch, 
> PHOENIX-2931-v3.patch, PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Updated] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-22 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2931:
-
Attachment: PHOENIX-2931-v3.patch

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931-v2.patch, 
> PHOENIX-2931-v3.patch, PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-22 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

[~enis] Thanks for the review. I have made the following modifications:
* Removed the printlns and test related checking. Added a log for debug.
* Moved getDefaultConnectionString() to driver codes as a private method.

As said, in PhoenixRuntime we only parse the command line. We add the 
connection string in driver later.
Will upload a revised patch

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931-v2.patch, 
> PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-21 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

No change in PhoenixEmbeddedDriverTest.testNegativeGetConnectionInfo(). Those 
are not supported connection strings.  

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931-v2.patch, 
> PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-21 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

>We already check whether it is a file or not above, no? The suggestion 
>simplifies the logic for handling the case where arg does not end with .csv or 
>.sql.
No. Here we only parse the command line. We add the connection string in driver 
later.

Also will move getDefaultConnectionString() to driver codes as a private 
method. 


> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931-v2.patch, 
> PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-21 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

We need system tests for this. I do not think we have enough time for system 
testing. 

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931-v2.patch, 
> PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-21 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

[~ankit.singhal] Yes. If we could get it in. When is 4.8 due?

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931-v2.patch, 
> PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-21 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

[~enis] Thanks for the comments. See above.

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931-v2.patch, 
> PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-21 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

>Please remove System.out.println() statements.
The intention of this print statement was when users did not provide connection 
string in the command line, we could see it was getting from default 
explicitly. Of cause this info can be found from connection starting up print.

> Why jdbc:phoenix:null and jdbc:phoenix;test=true?
jdbc:phoenix:null came from psql command line if we did not provide the 
connection string. jdbc:phoenix;test=true came from PhoenixEmbeddedDriverTest.

 {code}
if (i ==0) {
  execCmd.connectionString = arg;
 } else {
  usageError("Don't know how to interpret argument '" + arg + "'", options);
}
{code}

This part of code is used by psql.py. If we did not provide connection string 
in the command line, the first arg would be a file. There is no guarantee the 
first one is a connection string. 

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931-v2.patch, 
> PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Updated] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-21 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2931:
-
Attachment: PHOENIX-2931-v2.patch

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931-v2.patch, 
> PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Updated] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-19 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2931:
-
Attachment: PHOENIX-2931-v1.patch

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Updated] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-19 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2931:
-
Attachment: (was: PHOENIX-2931-v1.patch)

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Updated] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-16 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2931:
-
Fix Version/s: 4.8.0

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Updated] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-16 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2931:
-
Attachment: PHOENIX-2931-v1.patch

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-16 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

There are 2 options for the solution. One is checking the connection string in 
Python. If not found, get it from hbase-site.xml. The other one is checking it 
in driver and adding the connection string if not supplied. I had played both. 
In my previous patch, had used the 1st approach given that it could be slightly 
faster and fail fast. Some internal discussion/review [~enis] suggested 
changing one place was better among [~sergey.soldatov] [~elserj]. Uploaded a 
version on 2nd approach (v1 patch). Also will preserve the order of connection 
string. It would be always before input files if supplied. Thanks all for the 
discussion and review!

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Attachments: PHOENIX-2931-v1.patch, PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2934) Checking a coerce expression at top level should not be necessary for Union All query

2016-06-12 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2934:
--

The tests on this patch have dependency on PHOENIX-2886. With the patch of 
PHOENIX-2886, QueryCompilerTest passed on my local machine,.  

> Checking a coerce expression at top level should not be necessary for Union 
> All query
> -
>
> Key: PHOENIX-2934
> URL: https://issues.apache.org/jira/browse/PHOENIX-2934
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Attachments: PHOENIX-2934-v1.patch, PHOENIX-2934.patch
>
>
> When working on PHOENIX-2886, found that we need special handling of coerce 
> expression. Otherwise the following query would fail.
> {code}
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> select id, cast( 'foo' as char(10)) firstname, lastname from person union all 
> select * from person;
> {code}
> Checking a coerce expression at top level should not be necessary. Need to 
> find out root cause on coerceExpression. 



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


[jira] [Updated] (PHOENIX-2934) Checking a coerce expression at top level should not be necessary for Union All query

2016-06-10 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2934:
-
Attachment: PHOENIX-2934-v1.patch

> Checking a coerce expression at top level should not be necessary for Union 
> All query
> -
>
> Key: PHOENIX-2934
> URL: https://issues.apache.org/jira/browse/PHOENIX-2934
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Attachments: PHOENIX-2934-v1.patch, PHOENIX-2934.patch
>
>
> When working on PHOENIX-2886, found that we need special handling of coerce 
> expression. Otherwise the following query would fail.
> {code}
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> select id, cast( 'foo' as char(10)) firstname, lastname from person union all 
> select * from person;
> {code}
> Checking a coerce expression at top level should not be necessary. Need to 
> find out root cause on coerceExpression. 



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


[jira] [Updated] (PHOENIX-2934) Checking a coerce expression at top level should not be necessary for Union All query

2016-06-10 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2934:
-
Attachment: (was: PHOENIX-2934-v1.patch)

> Checking a coerce expression at top level should not be necessary for Union 
> All query
> -
>
> Key: PHOENIX-2934
> URL: https://issues.apache.org/jira/browse/PHOENIX-2934
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Attachments: PHOENIX-2934-v1.patch, PHOENIX-2934.patch
>
>
> When working on PHOENIX-2886, found that we need special handling of coerce 
> expression. Otherwise the following query would fail.
> {code}
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> select id, cast( 'foo' as char(10)) firstname, lastname from person union all 
> select * from person;
> {code}
> Checking a coerce expression at top level should not be necessary. Need to 
> find out root cause on coerceExpression. 



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


[jira] [Updated] (PHOENIX-2934) Checking a coerce expression at top level should not be necessary for Union All query

2016-06-10 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2934:
-
Attachment: PHOENIX-2934-v1.patch

> Checking a coerce expression at top level should not be necessary for Union 
> All query
> -
>
> Key: PHOENIX-2934
> URL: https://issues.apache.org/jira/browse/PHOENIX-2934
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Attachments: PHOENIX-2934-v1.patch, PHOENIX-2934.patch
>
>
> When working on PHOENIX-2886, found that we need special handling of coerce 
> expression. Otherwise the following query would fail.
> {code}
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> select id, cast( 'foo' as char(10)) firstname, lastname from person union all 
> select * from person;
> {code}
> Checking a coerce expression at top level should not be necessary. Need to 
> find out root cause on coerceExpression. 



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


[jira] [Commented] (PHOENIX-2934) Checking a coerce expression at top level should not be necessary for Union All query

2016-06-10 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2934:
--

Thanks [~jamestaylor] and [~sergey.soldatov] for reviewing the patch. 
{code}
select cast('1234234234' as char(3)) c from p;
{code}
It did not check the length of the literal expression . We could check it when 
parsing it. It is a different issue. 

For the coerce expression addressed in this Jira, I have updated the patch 
adding UT test, modifying IT test, and cleaned up codes to reuse super class 
implementation. Thanks [~sergey.soldatov] for reviewing this version.

> Checking a coerce expression at top level should not be necessary for Union 
> All query
> -
>
> Key: PHOENIX-2934
> URL: https://issues.apache.org/jira/browse/PHOENIX-2934
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Attachments: PHOENIX-2934-v1.patch, PHOENIX-2934.patch
>
>
> When working on PHOENIX-2886, found that we need special handling of coerce 
> expression. Otherwise the following query would fail.
> {code}
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> select id, cast( 'foo' as char(10)) firstname, lastname from person union all 
> select * from person;
> {code}
> Checking a coerce expression at top level should not be necessary. Need to 
> find out root cause on coerceExpression. 



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


[jira] [Updated] (PHOENIX-2947) NPE in ExpresssionCompiler.visitLeave

2016-06-08 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2947:
-
Attachment: (was: PHOENIX-2947-v1.patch)

> NPE in ExpresssionCompiler.visitLeave
> -
>
> Key: PHOENIX-2947
> URL: https://issues.apache.org/jira/browse/PHOENIX-2947
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2947-v1.patch, PHOENIX-2947.patch
>
>
> When running tests, got NPE in ExpressionCompiler.java
> {code}
> java.lang.NullPointerException
>   at 
> org.apache.phoenix.compile.ExpressionCompiler.visitLeave(ExpressionCompiler.java:1308)
>   at 
> org.apache.phoenix.compile.ExpressionCompiler.visitLeave(ExpressionCompiler.java:141)
>   at 
> org.apache.phoenix.parse.ExistsParseNode.accept(ExistsParseNode.java:53)
>   at 
> org.apache.phoenix.parse.CompoundParseNode.acceptChildren(CompoundParseNode.java:64)
>   at org.apache.phoenix.parse.AndParseNode.accept(AndParseNode.java:47)
>   at 
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:130)
>   at 
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:100)
>   at 
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:216)
>   at 
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:143)
>   at 
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:138)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:281)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:266)
>   at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:265)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1444)
>   at sqlline.Commands.execute(Commands.java:822)
>   at sqlline.Commands.sql(Commands.java:732)
>   at sqlline.SqlLine.dispatch(SqlLine.java:807)
>   at sqlline.SqlLine.begin(SqlLine.java:681)
>   at sqlline.SqlLine.start(SqlLine.java:398)
> {code}



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


[jira] [Updated] (PHOENIX-2947) NPE in ExpresssionCompiler.visitLeave

2016-06-08 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2947:
-
Attachment: PHOENIX-2947-v1.patch

> NPE in ExpresssionCompiler.visitLeave
> -
>
> Key: PHOENIX-2947
> URL: https://issues.apache.org/jira/browse/PHOENIX-2947
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2947-v1.patch, PHOENIX-2947.patch
>
>
> When running tests, got NPE in ExpressionCompiler.java
> {code}
> java.lang.NullPointerException
>   at 
> org.apache.phoenix.compile.ExpressionCompiler.visitLeave(ExpressionCompiler.java:1308)
>   at 
> org.apache.phoenix.compile.ExpressionCompiler.visitLeave(ExpressionCompiler.java:141)
>   at 
> org.apache.phoenix.parse.ExistsParseNode.accept(ExistsParseNode.java:53)
>   at 
> org.apache.phoenix.parse.CompoundParseNode.acceptChildren(CompoundParseNode.java:64)
>   at org.apache.phoenix.parse.AndParseNode.accept(AndParseNode.java:47)
>   at 
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:130)
>   at 
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:100)
>   at 
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:216)
>   at 
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:143)
>   at 
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:138)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:281)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:266)
>   at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:265)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1444)
>   at sqlline.Commands.execute(Commands.java:822)
>   at sqlline.Commands.sql(Commands.java:732)
>   at sqlline.SqlLine.dispatch(SqlLine.java:807)
>   at sqlline.SqlLine.begin(SqlLine.java:681)
>   at sqlline.SqlLine.start(SqlLine.java:398)
> {code}



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


[jira] [Comment Edited] (PHOENIX-2934) Checking a coerce expression at top level should not be necessary for Union All query

2016-06-02 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu edited comment on PHOENIX-2934 at 6/2/16 9:14 PM:
--

[~jamestaylor] I added the check for desiredMaxLength > b.length for PChar. The 
super class is PDataType which is for all data types. Do we need check it for 
all data types? Plus, when I put the check in the super class PDataType.java 
coerceBytes(), I got the following exception. 
{code}
java.lang.IllegalArgumentException: fromIndex(7) > toIndex(3)
at java.util.Arrays.rangeCheck(Arrays.java:794)
at java.util.Arrays.fill(Arrays.java:2048)
at 
org.apache.phoenix.schema.types.PDataType.coerceBytes(PDataType.java:824)
at 
org.apache.phoenix.schema.types.PDataType.coerceBytes(PDataType.java:799)
at 
org.apache.phoenix.expression.CoerceExpression.evaluate(CoerceExpression.java:149)
at 
org.apache.phoenix.schema.KeyValueSchema.toBytes(KeyValueSchema.java:112)
at 
org.apache.phoenix.execute.TupleProjector.projectResults(TupleProjector.java:244)
at 
org.apache.phoenix.execute.TupleProjectionPlan$1.next(TupleProjectionPlan.java:77)
at 
org.apache.phoenix.iterate.LookAheadResultIterator$1.advance(LookAheadResultIterator.java:47)
at 
org.apache.phoenix.iterate.LookAheadResultIterator.init(LookAheadResultIterator.java:59)
at 
org.apache.phoenix.iterate.LookAheadResultIterator.peek(LookAheadResultIterator.java:73)
at 
org.apache.phoenix.iterate.ConcatResultIterator.currentIterator(ConcatResultIterator.java:100)
at 
org.apache.phoenix.iterate.ConcatResultIterator.next(ConcatResultIterator.java:117)
at 
org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:778)
at 
org.apache.phoenix.end2end.UnionAllIT.testCoerceExpr(UnionAllIT.java:777)
{code}


was (Author: aliciashu):
I added the check for desiredMaxLength > b.length for PChar. The super class is 
PDataType which is for all data types. Do we need check it for all data types? 
Plus, when I put the check in the super class PDataType.java coerceBytes(), I 
got the following exception. 
{code}
java.lang.IllegalArgumentException: fromIndex(7) > toIndex(3)
at java.util.Arrays.rangeCheck(Arrays.java:794)
at java.util.Arrays.fill(Arrays.java:2048)
at 
org.apache.phoenix.schema.types.PDataType.coerceBytes(PDataType.java:824)
at 
org.apache.phoenix.schema.types.PDataType.coerceBytes(PDataType.java:799)
at 
org.apache.phoenix.expression.CoerceExpression.evaluate(CoerceExpression.java:149)
at 
org.apache.phoenix.schema.KeyValueSchema.toBytes(KeyValueSchema.java:112)
at 
org.apache.phoenix.execute.TupleProjector.projectResults(TupleProjector.java:244)
at 
org.apache.phoenix.execute.TupleProjectionPlan$1.next(TupleProjectionPlan.java:77)
at 
org.apache.phoenix.iterate.LookAheadResultIterator$1.advance(LookAheadResultIterator.java:47)
at 
org.apache.phoenix.iterate.LookAheadResultIterator.init(LookAheadResultIterator.java:59)
at 
org.apache.phoenix.iterate.LookAheadResultIterator.peek(LookAheadResultIterator.java:73)
at 
org.apache.phoenix.iterate.ConcatResultIterator.currentIterator(ConcatResultIterator.java:100)
at 
org.apache.phoenix.iterate.ConcatResultIterator.next(ConcatResultIterator.java:117)
at 
org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:778)
at 
org.apache.phoenix.end2end.UnionAllIT.testCoerceExpr(UnionAllIT.java:777)
{code}

> Checking a coerce expression at top level should not be necessary for Union 
> All query
> -
>
> Key: PHOENIX-2934
> URL: https://issues.apache.org/jira/browse/PHOENIX-2934
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Attachments: PHOENIX-2934.patch
>
>
> When working on PHOENIX-2886, found that we need special handling of coerce 
> expression. Otherwise the following query would fail.
> {code}
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> select id, cast( 'foo' as char(10)) firstname, lastname from person union all 
> select * from person;
> {code}
> Checking a coerce expression at top level should not be necessary. Need to 
> find out root cause on coerceExpression. 



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


[jira] [Commented] (PHOENIX-2934) Checking a coerce expression at top level should not be necessary for Union All query

2016-06-02 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2934:
--

I added the check for desiredMaxLength > b.length for PChar. The super class is 
PDataType which is for all data types. Do we need check it for all data types? 
Plus, when I put the check in the super class PDataType.java coerceBytes(), I 
got the following exception. 
{code}
java.lang.IllegalArgumentException: fromIndex(7) > toIndex(3)
at java.util.Arrays.rangeCheck(Arrays.java:794)
at java.util.Arrays.fill(Arrays.java:2048)
at 
org.apache.phoenix.schema.types.PDataType.coerceBytes(PDataType.java:824)
at 
org.apache.phoenix.schema.types.PDataType.coerceBytes(PDataType.java:799)
at 
org.apache.phoenix.expression.CoerceExpression.evaluate(CoerceExpression.java:149)
at 
org.apache.phoenix.schema.KeyValueSchema.toBytes(KeyValueSchema.java:112)
at 
org.apache.phoenix.execute.TupleProjector.projectResults(TupleProjector.java:244)
at 
org.apache.phoenix.execute.TupleProjectionPlan$1.next(TupleProjectionPlan.java:77)
at 
org.apache.phoenix.iterate.LookAheadResultIterator$1.advance(LookAheadResultIterator.java:47)
at 
org.apache.phoenix.iterate.LookAheadResultIterator.init(LookAheadResultIterator.java:59)
at 
org.apache.phoenix.iterate.LookAheadResultIterator.peek(LookAheadResultIterator.java:73)
at 
org.apache.phoenix.iterate.ConcatResultIterator.currentIterator(ConcatResultIterator.java:100)
at 
org.apache.phoenix.iterate.ConcatResultIterator.next(ConcatResultIterator.java:117)
at 
org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:778)
at 
org.apache.phoenix.end2end.UnionAllIT.testCoerceExpr(UnionAllIT.java:777)
{code}

> Checking a coerce expression at top level should not be necessary for Union 
> All query
> -
>
> Key: PHOENIX-2934
> URL: https://issues.apache.org/jira/browse/PHOENIX-2934
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Attachments: PHOENIX-2934.patch
>
>
> When working on PHOENIX-2886, found that we need special handling of coerce 
> expression. Otherwise the following query would fail.
> {code}
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> select id, cast( 'foo' as char(10)) firstname, lastname from person union all 
> select * from person;
> {code}
> Checking a coerce expression at top level should not be necessary. Need to 
> find out root cause on coerceExpression. 



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


[jira] [Comment Edited] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-06-02 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu edited comment on PHOENIX-2886 at 6/2/16 8:39 PM:
--

[~jamestaylor]I uploaded the patch for coerce expression issue to PHOENIX-2934. 


was (Author: aliciashu):
I uploaded the patch for coerce expression issue to PHOENIX-2934. 

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886-v4.patch, PHOENIX-2886.patch, 
> UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-06-02 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

I uploaded the patch for coerce expression issue to PHOENIX-2934. 

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886-v4.patch, PHOENIX-2886.patch, 
> UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2934) Checking a coerce expression at top level should not be necessary for Union All query

2016-06-02 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2934:
--

Uploaded the patch. It fixes the issue of PChar not updating to 
desiredMaxLength when needed. This issue manifested in Union All query and 
should be committed after PHOENIX-2886.

> Checking a coerce expression at top level should not be necessary for Union 
> All query
> -
>
> Key: PHOENIX-2934
> URL: https://issues.apache.org/jira/browse/PHOENIX-2934
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Attachments: PHOENIX-2934.patch
>
>
> When working on PHOENIX-2886, found that we need special handling of coerce 
> expression. Otherwise the following query would fail.
> {code}
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> select id, cast( 'foo' as char(10)) firstname, lastname from person union all 
> select * from person;
> {code}
> Checking a coerce expression at top level should not be necessary. Need to 
> find out root cause on coerceExpression. 



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


[jira] [Updated] (PHOENIX-2934) Checking a coerce expression at top level should not be necessary for Union All query

2016-06-02 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2934:
-
Attachment: PHOENIX-2934.patch

> Checking a coerce expression at top level should not be necessary for Union 
> All query
> -
>
> Key: PHOENIX-2934
> URL: https://issues.apache.org/jira/browse/PHOENIX-2934
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Attachments: PHOENIX-2934.patch
>
>
> When working on PHOENIX-2886, found that we need special handling of coerce 
> expression. Otherwise the following query would fail.
> {code}
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> select id, cast( 'foo' as char(10)) firstname, lastname from person union all 
> select * from person;
> {code}
> Checking a coerce expression at top level should not be necessary. Need to 
> find out root cause on coerceExpression. 



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-06-01 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

I have revised the patch to get defaults from hbase-site.xml without adding 
"-connection" option to see how it would work out since we would not make 
"-connection" required anyway. I tested it locally and would get a cluster to 
test it in a broad range as well. If it works out, we do not need change any 
existing behavior. Users just get a new option to not input Zookeeper 
connection string if they choose to do so. 

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Attachments: PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2934) Checking a coerce expression at top level should not be necessary for Union All query

2016-05-31 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2934:
--

Looked into the codes, the issue was caused by compilation time rewrite of the 
coerce expression. 

For example:
select id, cast('foo' as char(10)) firstname, lastname from person;

In ProjectionCompiler.java, 
{code}
public static RowProjector compile(StatementContext context, SelectStatement 
statement, GroupBy groupBy, List targetColumns, Expression 
where) throws SQLException {

Expression expression = node.accept(selectVisitor);
projectedExpressions.add(expression);
{code}
After node.accept(selectVisitor), cast('foo' as char(10)) becomes 
to_char('foo'), the maxLength=3. For Union All query, we would expect the 
MaxLength=10.


> Checking a coerce expression at top level should not be necessary for Union 
> All query
> -
>
> Key: PHOENIX-2934
> URL: https://issues.apache.org/jira/browse/PHOENIX-2934
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>
> When working on PHOENIX-2886, found that we need special handling of coerce 
> expression. Otherwise the following query would fail.
> {code}
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> select id, cast( 'foo' as char(10)) firstname, lastname from person union all 
> select * from person;
> {code}
> Checking a coerce expression at top level should not be necessary. Need to 
> find out root cause on coerceExpression. 



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


[jira] [Commented] (PHOENIX-2947) NPE in ExpresssionCompiler.visitLeave

2016-05-31 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2947:
--

The NPE can be easily reproduced. Added a test case and uploaded a revised 
patch.

> NPE in ExpresssionCompiler.visitLeave
> -
>
> Key: PHOENIX-2947
> URL: https://issues.apache.org/jira/browse/PHOENIX-2947
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2947-v1.patch, PHOENIX-2947.patch
>
>
> When running tests, got NPE in ExpressionCompiler.java
> {code}
> java.lang.NullPointerException
>   at 
> org.apache.phoenix.compile.ExpressionCompiler.visitLeave(ExpressionCompiler.java:1308)
>   at 
> org.apache.phoenix.compile.ExpressionCompiler.visitLeave(ExpressionCompiler.java:141)
>   at 
> org.apache.phoenix.parse.ExistsParseNode.accept(ExistsParseNode.java:53)
>   at 
> org.apache.phoenix.parse.CompoundParseNode.acceptChildren(CompoundParseNode.java:64)
>   at org.apache.phoenix.parse.AndParseNode.accept(AndParseNode.java:47)
>   at 
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:130)
>   at 
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:100)
>   at 
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:216)
>   at 
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:143)
>   at 
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:138)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:281)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:266)
>   at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:265)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1444)
>   at sqlline.Commands.execute(Commands.java:822)
>   at sqlline.Commands.sql(Commands.java:732)
>   at sqlline.SqlLine.dispatch(SqlLine.java:807)
>   at sqlline.SqlLine.begin(SqlLine.java:681)
>   at sqlline.SqlLine.start(SqlLine.java:398)
> {code}



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


[jira] [Updated] (PHOENIX-2947) NPE in ExpresssionCompiler.visitLeave

2016-05-31 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2947:
-
Attachment: PHOENIX-2947-v1.patch

> NPE in ExpresssionCompiler.visitLeave
> -
>
> Key: PHOENIX-2947
> URL: https://issues.apache.org/jira/browse/PHOENIX-2947
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2947-v1.patch, PHOENIX-2947.patch
>
>
> When running tests, got NPE in ExpressionCompiler.java
> {code}
> java.lang.NullPointerException
>   at 
> org.apache.phoenix.compile.ExpressionCompiler.visitLeave(ExpressionCompiler.java:1308)
>   at 
> org.apache.phoenix.compile.ExpressionCompiler.visitLeave(ExpressionCompiler.java:141)
>   at 
> org.apache.phoenix.parse.ExistsParseNode.accept(ExistsParseNode.java:53)
>   at 
> org.apache.phoenix.parse.CompoundParseNode.acceptChildren(CompoundParseNode.java:64)
>   at org.apache.phoenix.parse.AndParseNode.accept(AndParseNode.java:47)
>   at 
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:130)
>   at 
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:100)
>   at 
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:216)
>   at 
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:143)
>   at 
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:138)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:281)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:266)
>   at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:265)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1444)
>   at sqlline.Commands.execute(Commands.java:822)
>   at sqlline.Commands.sql(Commands.java:732)
>   at sqlline.SqlLine.dispatch(SqlLine.java:807)
>   at sqlline.SqlLine.begin(SqlLine.java:681)
>   at sqlline.SqlLine.start(SqlLine.java:398)
> {code}



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-05-28 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

>If the user doesn't provide -connection, we could try adding the default 
>connection string from hbase-site.xml only if the first positional argument 
>points to a file (or there are no positional arguments). 

We can do this checking w/o adding "-connection". If for new usages we would 
like to add "-connection", should document it and would not make it required 
(so as to backwards compatible).  

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Attachments: PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Updated] (PHOENIX-2947) NPE in ExpresssionCompiler.visitLeave

2016-05-27 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2947:
-
Attachment: PHOENIX-2947.patch

> NPE in ExpresssionCompiler.visitLeave
> -
>
> Key: PHOENIX-2947
> URL: https://issues.apache.org/jira/browse/PHOENIX-2947
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2947.patch
>
>
> When running tests, got NPE in ExpressionCompiler.java
> {code}
> java.lang.NullPointerException
>   at 
> org.apache.phoenix.compile.ExpressionCompiler.visitLeave(ExpressionCompiler.java:1308)
>   at 
> org.apache.phoenix.compile.ExpressionCompiler.visitLeave(ExpressionCompiler.java:141)
>   at 
> org.apache.phoenix.parse.ExistsParseNode.accept(ExistsParseNode.java:53)
>   at 
> org.apache.phoenix.parse.CompoundParseNode.acceptChildren(CompoundParseNode.java:64)
>   at org.apache.phoenix.parse.AndParseNode.accept(AndParseNode.java:47)
>   at 
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:130)
>   at 
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:100)
>   at 
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:216)
>   at 
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:143)
>   at 
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:138)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:281)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:266)
>   at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:265)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1444)
>   at sqlline.Commands.execute(Commands.java:822)
>   at sqlline.Commands.sql(Commands.java:732)
>   at sqlline.SqlLine.dispatch(SqlLine.java:807)
>   at sqlline.SqlLine.begin(SqlLine.java:681)
>   at sqlline.SqlLine.start(SqlLine.java:398)
> {code}



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


[jira] [Commented] (PHOENIX-2947) NPE in ExpresssionCompiler.visitLeave

2016-05-27 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2947:
--

Uploaded the patch.

> NPE in ExpresssionCompiler.visitLeave
> -
>
> Key: PHOENIX-2947
> URL: https://issues.apache.org/jira/browse/PHOENIX-2947
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2947.patch
>
>
> When running tests, got NPE in ExpressionCompiler.java
> {code}
> java.lang.NullPointerException
>   at 
> org.apache.phoenix.compile.ExpressionCompiler.visitLeave(ExpressionCompiler.java:1308)
>   at 
> org.apache.phoenix.compile.ExpressionCompiler.visitLeave(ExpressionCompiler.java:141)
>   at 
> org.apache.phoenix.parse.ExistsParseNode.accept(ExistsParseNode.java:53)
>   at 
> org.apache.phoenix.parse.CompoundParseNode.acceptChildren(CompoundParseNode.java:64)
>   at org.apache.phoenix.parse.AndParseNode.accept(AndParseNode.java:47)
>   at 
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:130)
>   at 
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:100)
>   at 
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:216)
>   at 
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:143)
>   at 
> org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:138)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:281)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:266)
>   at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:265)
>   at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1444)
>   at sqlline.Commands.execute(Commands.java:822)
>   at sqlline.Commands.sql(Commands.java:732)
>   at sqlline.SqlLine.dispatch(SqlLine.java:807)
>   at sqlline.SqlLine.begin(SqlLine.java:681)
>   at sqlline.SqlLine.start(SqlLine.java:398)
> {code}



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


[jira] [Created] (PHOENIX-2947) NPE in ExpresssionCompiler.visitLeave

2016-05-27 Thread Alicia Ying Shu (JIRA)
Alicia Ying Shu created PHOENIX-2947:


 Summary: NPE in ExpresssionCompiler.visitLeave
 Key: PHOENIX-2947
 URL: https://issues.apache.org/jira/browse/PHOENIX-2947
 Project: Phoenix
  Issue Type: Bug
Reporter: Alicia Ying Shu
Assignee: Alicia Ying Shu
 Fix For: 4.8.0


When running tests, got NPE in ExpressionCompiler.java
{code}
java.lang.NullPointerException
at 
org.apache.phoenix.compile.ExpressionCompiler.visitLeave(ExpressionCompiler.java:1308)
at 
org.apache.phoenix.compile.ExpressionCompiler.visitLeave(ExpressionCompiler.java:141)
at 
org.apache.phoenix.parse.ExistsParseNode.accept(ExistsParseNode.java:53)
at 
org.apache.phoenix.parse.CompoundParseNode.acceptChildren(CompoundParseNode.java:64)
at org.apache.phoenix.parse.AndParseNode.accept(AndParseNode.java:47)
at 
org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:130)
at 
org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:100)
at 
org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:216)
at 
org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:143)
at 
org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:138)
at 
org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:281)
at 
org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:266)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at 
org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:265)
at 
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1444)
at sqlline.Commands.execute(Commands.java:822)
at sqlline.Commands.sql(Commands.java:732)
at sqlline.SqlLine.dispatch(SqlLine.java:807)
at sqlline.SqlLine.begin(SqlLine.java:681)
at sqlline.SqlLine.start(SqlLine.java:398)
{code}



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-27 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

Modified the lines that were longer than 100 chars. Replaced with v4 patch.

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886-v4.patch, PHOENIX-2886.patch, 
> UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Updated] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-27 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2886:
-
Attachment: PHOENIX-2886-v4.patch

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886-v4.patch, PHOENIX-2886.patch, 
> UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Updated] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-27 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2886:
-
Attachment: (was: PHOENIX-2886-v4.patch)

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886-v4.patch, PHOENIX-2886.patch, 
> UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Updated] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-27 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2886:
-
Attachment: PHOENIX-2886-v4.patch

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886-v4.patch, PHOENIX-2886.patch, 
> UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Updated] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-27 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2886:
-
Attachment: (was: PHOENIX-2886-v4.patch)

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch, UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-26 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

Uploaded a revised patch with more test cases

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886-v4.patch, PHOENIX-2886.patch, 
> UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Updated] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-26 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2886:
-
Attachment: PHOENIX-2886-v4.patch

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886-v4.patch, PHOENIX-2886.patch, 
> UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Assigned] (PHOENIX-2934) Checking a coerce expression at top level should not be necessary for Union All query

2016-05-26 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu reassigned PHOENIX-2934:


Assignee: Alicia Ying Shu

> Checking a coerce expression at top level should not be necessary for Union 
> All query
> -
>
> Key: PHOENIX-2934
> URL: https://issues.apache.org/jira/browse/PHOENIX-2934
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>
> When working on PHOENIX-2886, found that we need special handling of coerce 
> expression. Otherwise the following query would fail.
> {code}
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> select id, cast( 'foo' as char(10)) firstname, lastname from person union all 
> select * from person;
> {code}
> Checking a coerce expression at top level should not be necessary. Need to 
> find out root cause on coerceExpression. 



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-05-26 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

[~jamestaylor] [~elserj] [~sergey.soldatov] Thanks for the discussion! Let me 
step back a little bit to explain why we had suggested using a keyword 
"default" or position-based checking existence of a file. The main reason is 
that we had hoped to avoid adding any directive that changes current behavior. 
If allow adding a directive such as "-connection", the solution becomes simple. 
We would require all sqlline.py and psql.py usages to add "-connection" if they 
would like to provide zookeeper quorum. If we did not find this directive, we 
would add zookeeper quorum from hbase-site.xml. But be aware that currently 
there is no requirement to use "-connnection" for either sqlline.py or psql.py. 
If users did not use it, we may wrongly replace their quorum with the one in 
hbase-site.xml. This solution is not backward compatible. Is it acceptable?  

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Attachments: PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-26 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

My tests reveals that checking sortOrder helped preserve local ordering. 

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch, UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-26 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

Agree that we need to check MaxLength and max Scale and their nullables for 
target data types. As for SortOrder it is different. The final sort order of 
Union All query is determined by ORDER BY. The individual Sort Order of the 
individual sql query will not change even we change the Sort Order here since 
we will not add a SORT operation. It is just a placeholder for creating 
PColumnImpl for projection. So it is a no-op and we do not need to check/change 
it in target data types, Order by will take care it in the final results. If 
there is no Order By, the order of results for individual query will keep as it 
is.

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch, UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-25 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

Need take PChar.INSTANCE from the checking list

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch, UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-25 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

Noticed another issue. In PVarchar.java
  @Override
  public boolean isCoercibleTo(PDataType targetType) {
return equalsAny(targetType, this, PChar.INSTANCE, PVarbinary.INSTANCE, 
PBinary.INSTANCE);
  }

If I have a PVarchar and previous data type is PChar, the above 
isCoercibleTo(char) will return true, which is wrong in Union All context. We 
would like it to return false so that the target type for final result becomes 
PVarchar. [~jamestaylor] [~sergey.soldatov]

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch, UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-25 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

[~sergey.soldatov] Noticed the different lengths for cast() in my tests as 
well. If we take into consideration of desiredMaxLength, coerce expression 
should work. 

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch, UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Issue Comment Deleted] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-25 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2886:
-
Comment: was deleted

(was: [~sergey.soldatov] I noticed the different lengths for the coerce 
expression for the query {code} select id, cast('foo' as char(10)) firstname, 
lastname from person; {code} at very beginning. I think part of the reason for 
PDataType.coerceBytes not taking in consideration of changing length is that 
Union All queries need to adjust across queries. But single query does not need 
to.  The query result for {code} select id, cast('foo' as char(10)) firstname, 
lastname from person; {code} looks right. )

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch, UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-25 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

[~sergey.soldatov] I noticed the different lengths for the coerce expression 
for the query {code} select id, cast('foo' as char(10)) firstname, lastname 
from person; {code} at very beginning. I think part of the reason for 
PDataType.coerceBytes not taking in consideration of changing length is that 
Union All queries need to adjust across queries. But single query does not need 
to.  The query result for {code} select id, cast('foo' as char(10)) firstname, 
lastname from person; {code} looks right. 

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch, UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-23 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

Let me run some tests. 

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch, UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-23 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

Yes. I added all other stuff: nullable scale, sortOrder, nullable maxLength, 
etc. 

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch, UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-23 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

[~jamestaylor] I have the patch ready. I removed the special handling of the 
coerce expression. Do you want me to upload it or wait until we have some 
conclusion on coerce expression?

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch, UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-05-23 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

What if users use ".txt", ".doc", etc. ?

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Attachments: PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Issue Comment Deleted] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-05-23 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2931:
-
Comment: was deleted

(was: What about if users use other extensions such as ".txt", ".csv", ".tsv", 
etc)

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Attachments: PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-05-23 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

What about if users use other extensions such as ".txt", ".csv", ".tsv", etc

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Attachments: PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-05-23 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

[~jamestaylor] Discussed this offline with [~sergey.soldatov] regarding to how 
to find the connection string. For psql.py, if there is any parameter without 
directive ('-' or '--'), will check whether it exists on file system. If not, 
assume it is a connection string, we are done. In this case, if it was a file 
and because it did not exit, the connection would fail anyway.
If it exists on file system, found a file and continue looking for connection 
string. If not finding any, construct the connection string from 
hbase-site.xml. If find another string, we are done.

Similar logic apply to sqlline.py as well. We can lift the requirement that 
connection string must be present as the 1st parameter when establishing a 
connection.

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Attachments: PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-23 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

[~jamestaylor] I uploaded UnionAllIT.java.diff that contains the test case to 
reproduce the exception after removing the special handling of coerce 
expression in my patch. The exception:
{code}
java.sql.SQLException: ERROR 201 (22000): Illegal data. Expected length of at 
least 10 bytes, but had 7
at 
org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:452)
at 
org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145)
at 
org.apache.phoenix.schema.KeyValueSchema.next(KeyValueSchema.java:211)
at 
org.apache.phoenix.expression.ProjectedColumnExpression.evaluate(ProjectedColumnExpression.java:115)
at 
org.apache.phoenix.compile.ExpressionProjector.getValue(ExpressionProjector.java:69)
at 
org.apache.phoenix.jdbc.PhoenixResultSet.getString(PhoenixResultSet.java:608)
at 
org.apache.phoenix.end2end.UnionAllIT.testDiffDataTypes(UnionAllIT.java:766)
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 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
{code}

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch, UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at le

[jira] [Updated] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-23 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2886:
-
Attachment: UnionAllIT.java.diff

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch, UnionAllIT.java.diff
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-23 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

[~jamestaylor] Is the coerce expression such as cast() evaluated on the client 
side? In serializeProjectorIntoScan(), when getting the expression type, it 
returns the runtime class of the object. If it is a 
CorrelateVariableFieldAccessExpression, it returns LiteralExpression class 
type. What is a CorrelateVariableFieldAccessExpression?

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-22 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

Filed PHOENIX-2934. Thanks.

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Created] (PHOENIX-2934) Checking a coerce expression at top level should not be necessary for Union All query

2016-05-22 Thread Alicia Ying Shu (JIRA)
Alicia Ying Shu created PHOENIX-2934:


 Summary: Checking a coerce expression at top level should not be 
necessary for Union All query
 Key: PHOENIX-2934
 URL: https://issues.apache.org/jira/browse/PHOENIX-2934
 Project: Phoenix
  Issue Type: Bug
Reporter: Alicia Ying Shu


When working on PHOENIX-2886, found that we need special handling of coerce 
expression. Otherwise the following query would fail.
{code}
create table person ( id bigint not null primary key, firstname char(10), 
lastname varchar(10) );
select id, cast( 'foo' as char(10)) firstname, lastname from person union all 
select * from person;
{code}
Checking a coerce expression at top level should not be necessary. Need to find 
out root cause on coerceExpression. 



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-22 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

[~jamestaylor] ok, got my env working. Ran with my patch the following
{code}
select id, cast('foo' as char(10)) || 'bar' firstname, lastname from person 
union all select * from person
{code}

Got back "foobar" which is consistent with query without UNION ALL
{code}
select id, cast('foo' as char(10)) || 'bar' firstname, lastname from person
{code}


> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-21 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

[~jamestaylor] Yes. I got that error message when I tried to run that sql stmt 
with my patch. Right now my env is broken after I rebased with latest codes. 
Thus can not verify the above query. Will do once I get my env working again. 

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-21 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

[~jamestaylor] Thanks for the review! The special checking for CoerceExpression 
was added because without it the following would fail. 'foo' is a 
LiteralExpression of type PVarchar of length 3, not char(10)

create table person ( id bigint not null primary key, firstname char(10), 
lastname varchar(10) );
select id, cast( 'foo' as char(10)) firstname, lastname from person union all 
select * from person;

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-05-20 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

We can use zookeeper.znode.parent property. If it is not set, should we use 
/hbase-unsecure as default? Normally zookeeper.znode.parent should be set for 
secure environment. 

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Attachments: PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-05-20 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

We can use ".sql" extension to determine for sqlline.py. However, psql.py can 
have multiple command line parameters and zookeeper quorum is not necessary the 
first parameter.

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Attachments: PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-05-20 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

Uploaded a patch.

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Attachments: PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-05-20 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

[~jamestaylor] Please provide your opinion on this. Thanks.

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Attachments: PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Updated] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-05-20 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2931:
-
Attachment: PHOENIX-2931.patch

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
> Attachments: PHOENIX-2931.patch
>
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-05-20 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

Users should set env HBASE_CONF_DIR, where hbase-site.xml is under this dir. 

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Commented] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-05-20 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2931:
--

Users can specify:
>sqlline.py default

Then sqlline will be started using zookeeper quorum+port from hbase configs in 
unsecured mode.

> Phoenix client asks users to provide configs in cli that are present on the 
> machine in hbase conf
> -
>
> Key: PHOENIX-2931
> URL: https://issues.apache.org/jira/browse/PHOENIX-2931
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
>Priority: Minor
>
> Users had complaints on running commands like
> {code}
> phoenix-sqlline 
> pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
>  service-logs.sql
> {code}
> However the zookeeper quorum and the port are available in hbase configs. 
> Phoenix should read these configs from the system instead of having the user 
> supply them every time.
> What we can do is to introduce a keyword "default". If it is specified, 
> default zookeeper quorum and port will be taken from hbase configs. 
> Otherwise, users can specify their own.



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


[jira] [Created] (PHOENIX-2931) Phoenix client asks users to provide configs in cli that are present on the machine in hbase conf

2016-05-20 Thread Alicia Ying Shu (JIRA)
Alicia Ying Shu created PHOENIX-2931:


 Summary: Phoenix client asks users to provide configs in cli that 
are present on the machine in hbase conf
 Key: PHOENIX-2931
 URL: https://issues.apache.org/jira/browse/PHOENIX-2931
 Project: Phoenix
  Issue Type: Bug
Reporter: Alicia Ying Shu
Assignee: Alicia Ying Shu
Priority: Minor


Users had complaints on running commands like
{code}
phoenix-sqlline 
pre-prod-poc-2.novalocal,pre-prod-poc-10.novalocal,pre-prod-poc-1.novalocal:/hbase-unsecure
 service-logs.sql
{code}
However the zookeeper quorum and the port are available in hbase configs. 
Phoenix should read these configs from the system instead of having the user 
supply them every time.

What we can do is to introduce a keyword "default". If it is specified, default 
zookeeper quorum and port will be taken from hbase configs. Otherwise, users 
can specify their own.



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-20 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

Attached v3 modified the lines longer than 100 chars.  Test failures were 
irrelevant to the patch.

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Updated] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-20 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2886:
-
Attachment: (was: PHOENIX-2886-v3.patch)

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Updated] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-20 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2886:
-
Attachment: PHOENIX-2886-v3.patch

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Updated] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-19 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2886:
-
Attachment: PHOENIX-2886-v3.patch

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Updated] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-19 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2886:
-
Attachment: (was: PHOENIX-2886-v2.patch)

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v3.patch, PHOENIX-2886.patch
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-19 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

The pherf test failures were irrelevant to the patch. Modified the lines longer 
than 100 chars. Uploaded a new one. 

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v2.patch, PHOENIX-2886.patch
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Updated] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-19 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2886:
-
Attachment: PHOENIX-2886-v2.patch

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886-v2.patch, PHOENIX-2886.patch
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-19 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

[~sergey.soldatov] That looks good. Thanks!

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886-v2.patch, 
> PHOENIX-2886.patch
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Commented] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-18 Thread Alicia Ying Shu (JIRA)

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

Alicia Ying Shu commented on PHOENIX-2886:
--

[~sergey.soldatov] Thanks for the review! Attached a revised patch. 

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886.patch
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


[jira] [Updated] (PHOENIX-2886) Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

2016-05-18 Thread Alicia Ying Shu (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alicia Ying Shu updated PHOENIX-2886:
-
Attachment: PHOENIX-2886-v1.patch

> Union ALL with Char column  not present in the table in Query 1 but in Query 
> 2 throw exception
> --
>
> Key: PHOENIX-2886
> URL: https://issues.apache.org/jira/browse/PHOENIX-2886
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Alicia Ying Shu
>Assignee: Alicia Ying Shu
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2886-v1.patch, PHOENIX-2886.patch
>
>
> To reproduce:
> create table person ( id bigint not null primary key, firstname char(10), 
> lastname varchar(10) );
> upsert into person values( 1, 'john', 'doe');
> upsert into person values( 2, 'jane', 'doe');
> -- fixed value for char(10)
> select id, 'foo' firstname, lastname from person union all select * from 
> person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13
> -- fixed value for bigint
> select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union 
> all select * from person;
> java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal 
> data. Expected length of at least 106 bytes, but had 13



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


  1   2   3   4   5   6   7   8   >