[
https://issues.apache.org/jira/browse/PHOENIX-600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gabriel Reid resolved PHOENIX-600.
----------------------------------
Resolution: Fixed
Bulk resolve of closed issues imported from GitHub. This status was reached by
first re-opening all closed imported issues and then resolving them in bulk.
> Table creation accepting same column names for two columns where one is
> primary key column.
> -------------------------------------------------------------------------------------------
>
> Key: PHOENIX-600
> URL: https://issues.apache.org/jira/browse/PHOENIX-600
> Project: Phoenix
> Issue Type: Task
> Reporter: chrajeshbabu
>
> Presently from phoenix we can create table with duplicate column names for
> different columns where one is primary key column. If we don't specify any
> column family while specifying column name we will append unique column name
> but for primary key we will not append any thing and it will be maintained by
> phoenix table.
> 0: jdbc:phoenix:10.18.40.47> CREATE TABLE stats.prod_metrics4 ( id char(50)
> not null primary key, id char(10) not null, count bigint);
> 0: jdbc:phoenix:10.18.40.47>
>
>
> But later while creating index or fetching we will get conflicts and failing
> with NPE.
>
> 0: jdbc:phoenix:10.18.40.47> select * from stats.prod_metrics3 where id =
> 'abcdefghij'
> . . . . . . . . . . . . . .> ;
> java.lang.NullPointerException
> at
> com.salesforce.phoenix.schema.PTableImpl.getColumn(PTableImpl.java:380)
> at
> com.salesforce.phoenix.compile.FromCompiler$MultiTableColumnResolver.resolveColumn(FromCompiler.java:326)
> at
> com.salesforce.phoenix.compile.ExpressionCompiler.resolveColumn(ExpressionCompiler.java:364)
> at
> com.salesforce.phoenix.compile.WhereCompiler$WhereExpressionCompiler.resolveColumn(WhereCompiler.java:108)
> at
> com.salesforce.phoenix.compile.ExpressionCompiler.visit(ExpressionCompiler.java:369)
> at
> com.salesforce.phoenix.compile.ExpressionCompiler.visit(ExpressionCompiler.java:50)
> at
> com.salesforce.phoenix.parse.ColumnParseNode.accept(ColumnParseNode.java:46)
> at
> com.salesforce.phoenix.parse.CompoundParseNode.acceptChildren(CompoundParseNode.java:70)
> at
> com.salesforce.phoenix.parse.ComparisonParseNode.accept(ComparisonParseNode.java:53)
> at
> com.salesforce.phoenix.compile.WhereCompiler.compileWhereClause(WhereCompiler.java:89)
> at
> com.salesforce.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:75)
> at
> com.salesforce.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:131)
> at
> com.salesforce.phoenix.optimize.QueryOptimizer.optimize(QueryOptimizer.java:31)
> at
> com.salesforce.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.optimizePlan(PhoenixStatement.java:160)
> at
> com.salesforce.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.executeQuery(PhoenixStatement.java:137)
> at
> com.salesforce.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.execute(PhoenixStatement.java:149)
> at
> com.salesforce.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:944)
> at sqlline.SqlLine$Commands.execute(SqlLine.java:3673)
> at sqlline.SqlLine$Commands.sql(SqlLine.java:3584)
> at sqlline.SqlLine.dispatch(SqlLine.java:821)
> at sqlline.SqlLine.begin(SqlLine.java:699)
> at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
> at sqlline.SqlLine.main(SqlLine.java:424)
--
This message was sent by Atlassian JIRA
(v6.2#6252)