You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2015/01/08 03:28:34 UTC

[jira] [Commented] (CALCITE-497) Support optional qualifier for column name references

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

James Taylor commented on CALCITE-497:
--------------------------------------

[~julianhyde] - Couple of questions on this one:
- What happens if a field is not unique among records and you try to reference it by it's name? For example:
    {code}
    CREATE TABLE T(k INTEGER PRIMARY KEY, a.v VARCHAR, b.v VARCHAR);
    SELECT v FROM T;
    {code}
    FWIW, Phoenix would throw a SQLException in this case
- What about the case in which there's a column name that conflicts with the record field name, like this?
    {code}
    CREATE TABLE T(k INTEGER PRIMARY KEY, a.k VARCHAR);
    SELECT k FROM T;
    {code}
    FWIW, Phoenix allows this with the column name having preference.


> Support optional qualifier for column name references
> -----------------------------------------------------
>
>                 Key: CALCITE-497
>                 URL: https://issues.apache.org/jira/browse/CALCITE-497
>             Project: Calcite
>          Issue Type: Sub-task
>            Reporter: James Taylor
>            Assignee: Julian Hyde
>              Labels: phoenix
>             Fix For: 1.0.0-incubating
>
>
> Some systems, such as HBase, have a named group to which columns belong (i.e. a column family in this case). To disambiguate column references (i.e. if the same column name is used in different column families), it's useful to allow an optional qualifier. This is similar to the RECORD field mechanism that Calcite already supports, but in this case the record name would be optional, since it's not necessary if the column names are unique. For example: http://phoenix.apache.org/language/index.html#column_ref



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