As you may or may not know, Phoenix allows for duplicate column names as long 
as they are placed in different column families.

You can create a table such as CREATE TABLE t (pk1 ..., x.v1, y.v1, ...).
Now each time you want to refer to v1 you need to qualify it with its column 
family or you get a AmbiguousColumnException.

Worse, you also do CREATE TABLE t (pk1 ..., v1, x.v1, ...). Now a using v1 in a 
query will silently resolve to v1 in the default column family and x.v1 does 
have to be qualified.

As I reason through how this should work in Trino's (formerly Presto) Phoenix 
connector, it occurs to me that should probably just disallow this.

CREATE TABLE t (pk1 ..., x.v1, y.v2, ...) works just fine and you can refer to 
both v1 and v2 without the need to qualify them with the column family.

So... In essence: Should we require all columns to be uniquely named, even with 
multiple column families?

Thanks.

-- Lars

Reply via email to