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

ASF GitHub Bot commented on PHOENIX-6343:
-----------------------------------------

virajjasani commented on pull request #1118:
URL: https://github.com/apache/phoenix/pull/1118#issuecomment-769018602


   It seems from visibility viewpoint, the problem remains same. Even with user 
defined CF, we see same column name as pk column.
   
   ```
   > create table tab3 (col1 INTEGER NOT NULL PRIMARY KEY, col2 INTEGER, a.col1 
INTEGER);
   No rows affected (1.254 seconds)
   
   > select * from tab3;
   +-------+-------+-------+
   | COL1  | COL2  | COL1  |
   +-------+-------+-------+
   +-------+-------+-------+
   
   
   > create table table4 (col1 INTEGER NOT NULL PRIMARY KEY, col2 INTEGER, 
a.col1 INTEGER, b.col1 INTEGER);
   No rows affected (1.254 seconds)
   0: jdbc:phoenix:> select * from table4;
   +-------+-------+-------+-------+
   | COL1  | COL2  | COL1  | COL1  |
   +-------+-------+-------+-------+
   +-------+-------+-------+-------+
   No rows selected (0.01 seconds)
   
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


> Phoenix allows duplicate column names when one of them is a primary key
> -----------------------------------------------------------------------
>
>                 Key: PHOENIX-6343
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6343
>             Project: Phoenix
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 5.0.0, 4.15.0
>            Reporter: Istvan Toth
>            Assignee: Viraj Jasani
>            Priority: Major
>             Fix For: 5.1.0, 4.16.1, 4.17.0
>
>
> {code:sql}
> CREATE TABLE IF NOT EXISTS test_duplicate_columns (
> name VARCHAR NOT NULL PRIMARY KEY,
> city VARCHAR, name VARCHAR);
> {code}
> {noformat}
> select * from test_duplicate_columns;
> +------+------+------+
> | NAME | CITY | NAME |
> +------+------+------+
> +------+------+------+
> No rows selected (0.015 seconds)
> {noformat}



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

Reply via email to