You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Ashish Thusoo (JIRA)" <ji...@apache.org> on 2008/11/14 00:18:44 UTC

[jira] Created: (HIVE-62) Add ability to describe nested types

Add ability to describe nested types
------------------------------------

                 Key: HIVE-62
                 URL: https://issues.apache.org/jira/browse/HIVE-62
             Project: Hadoop Hive
          Issue Type: New Feature
            Reporter: Ashish Thusoo
            Assignee: Ashish Thusoo


Add ability to describe nested types.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-62) Add ability to describe nested types

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-62?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

dhruba borthakur updated HIVE-62:
---------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

I just committed this. Thanks Ashish!

> Add ability to describe nested types
> ------------------------------------
>
>                 Key: HIVE-62
>                 URL: https://issues.apache.org/jira/browse/HIVE-62
>             Project: Hadoop Hive
>          Issue Type: New Feature
>    Affects Versions: 0.20.0
>            Reporter: Ashish Thusoo
>            Assignee: Ashish Thusoo
>             Fix For: 0.20.0
>
>         Attachments: patch-62.txt, patch-62_2.txt
>
>
> Add ability to describe nested types.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-62) Add ability to describe nested types

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647791#action_12647791 ] 

Namit Jain commented on HIVE-62:
--------------------------------

Can you add more comments - specially around the test case : describe_xpath.q ?
Otherwise, it looks OK.

+1

> Add ability to describe nested types
> ------------------------------------
>
>                 Key: HIVE-62
>                 URL: https://issues.apache.org/jira/browse/HIVE-62
>             Project: Hadoop Hive
>          Issue Type: New Feature
>            Reporter: Ashish Thusoo
>            Assignee: Ashish Thusoo
>         Attachments: patch-62.txt
>
>
> Add ability to describe nested types.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-62) Add ability to describe nested types

Posted by "Ashish Thusoo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-62?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashish Thusoo updated HIVE-62:
------------------------------

    Attachment: patch-62_2.txt

Added comments to the test case.

> Add ability to describe nested types
> ------------------------------------
>
>                 Key: HIVE-62
>                 URL: https://issues.apache.org/jira/browse/HIVE-62
>             Project: Hadoop Hive
>          Issue Type: New Feature
>    Affects Versions: 0.20.0
>            Reporter: Ashish Thusoo
>            Assignee: Ashish Thusoo
>             Fix For: 0.20.0
>
>         Attachments: patch-62.txt, patch-62_2.txt
>
>
> Add ability to describe nested types.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-62) Add ability to describe nested types

Posted by "Ashish Thusoo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647456#action_12647456 ] 

Ashish Thusoo commented on HIVE-62:
-----------------------------------

In hive we can do a describe on the table to get the top level columns of the table. However, there is no way of describing the types within the column in the case when the column is an object.

e.g. 

one cannot do 

describe tab.c1.f1 

to get field f1 of an object columns c1 of table tab.

the syntax is fairly straightforward for nested objects but becomes more complex for lists and maps.

So in order to inspect within the list we can do

describe tab.c1.f1.__elem.f2 where in __elem means that an element of the list f1 is being inspected.

similarly

describe tab.c1.f1.__key.f2
and

describe tab.c1.f1.__value.f2

would be the corresponding things for the key and values parts of a map.

Thoughts?


> Add ability to describe nested types
> ------------------------------------
>
>                 Key: HIVE-62
>                 URL: https://issues.apache.org/jira/browse/HIVE-62
>             Project: Hadoop Hive
>          Issue Type: New Feature
>            Reporter: Ashish Thusoo
>            Assignee: Ashish Thusoo
>
> Add ability to describe nested types.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-62) Add ability to describe nested types

Posted by "Ashish Thusoo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647459#action_12647459 ] 

Ashish Thusoo commented on HIVE-62:
-----------------------------------

This becomes a bit complex in case a partition of a table is being described.

today we can describe a partition simply by

describe tab partspec...

we could still do that by doing

describe typeexpr partspec...

> Add ability to describe nested types
> ------------------------------------
>
>                 Key: HIVE-62
>                 URL: https://issues.apache.org/jira/browse/HIVE-62
>             Project: Hadoop Hive
>          Issue Type: New Feature
>            Reporter: Ashish Thusoo
>            Assignee: Ashish Thusoo
>
> Add ability to describe nested types.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-62) Add ability to describe nested types

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-62?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Steinbach updated HIVE-62:
-------------------------------

    Fix Version/s: 0.3.0
                       (was: 0.6.0)
      Component/s: Query Processor

> Add ability to describe nested types
> ------------------------------------
>
>                 Key: HIVE-62
>                 URL: https://issues.apache.org/jira/browse/HIVE-62
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Ashish Thusoo
>            Assignee: Ashish Thusoo
>             Fix For: 0.3.0
>
>         Attachments: patch-62.txt, patch-62_2.txt
>
>
> Add ability to describe nested types.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-62) Add ability to describe nested types

Posted by "Ashish Thusoo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-62?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashish Thusoo updated HIVE-62:
------------------------------

    Attachment: patch-62.txt

Patch added.

> Add ability to describe nested types
> ------------------------------------
>
>                 Key: HIVE-62
>                 URL: https://issues.apache.org/jira/browse/HIVE-62
>             Project: Hadoop Hive
>          Issue Type: New Feature
>            Reporter: Ashish Thusoo
>            Assignee: Ashish Thusoo
>         Attachments: patch-62.txt
>
>
> Add ability to describe nested types.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-62) Add ability to describe nested types

Posted by "Zheng Shao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647738#action_12647738 ] 

Zheng Shao commented on HIVE-62:
--------------------------------

Talked with Ashish face-to-face. I agree both approaches have values.

We can have "describe type" after we added "create type" support.


> Add ability to describe nested types
> ------------------------------------
>
>                 Key: HIVE-62
>                 URL: https://issues.apache.org/jira/browse/HIVE-62
>             Project: Hadoop Hive
>          Issue Type: New Feature
>            Reporter: Ashish Thusoo
>            Assignee: Ashish Thusoo
>
> Add ability to describe nested types.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-62) Add ability to describe nested types

Posted by "Zheng Shao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647480#action_12647480 ] 

Zheng Shao commented on HIVE-62:
--------------------------------

Another way is to allow describe on types but not columns.

Basically if "describe table" says the column is of type x. Then we can do "describe type x", and it tells us the internal structure of x, either "map<y,z>", "list<e>", "struct { ... }", "primitive" or whatever.

This "describe type" grammar looks consistent to "create type".


> Add ability to describe nested types
> ------------------------------------
>
>                 Key: HIVE-62
>                 URL: https://issues.apache.org/jira/browse/HIVE-62
>             Project: Hadoop Hive
>          Issue Type: New Feature
>            Reporter: Ashish Thusoo
>            Assignee: Ashish Thusoo
>
> Add ability to describe nested types.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-62) Add ability to describe nested types

Posted by "Ashish Thusoo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647498#action_12647498 ] 

Ashish Thusoo commented on HIVE-62:
-----------------------------------

yes that is a possibility. One problem from a usability angle though is that even if I know the path to the field I would have to go though multiple describe types to get to the member that I am interested in finding the type of. e.g.

{int a;
 lObj b;
}

Obj {
  int c;
}

In order to find the type for c I would have to

describe T;

which would give me 

int a
Obj b;

then I would have to

describe type Obj;

which would give me

int c;

instead of just saying

describe T.b

Having a TYPE keyword though is a good idea, though Oracle and other OORDBMS do not make this explict.

Check out the Oracle type syntax at

http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12019.htm

though Oracle itself does not support the dotted notation to find the type of an element represented by an xpath expression as far as I know.






> Add ability to describe nested types
> ------------------------------------
>
>                 Key: HIVE-62
>                 URL: https://issues.apache.org/jira/browse/HIVE-62
>             Project: Hadoop Hive
>          Issue Type: New Feature
>            Reporter: Ashish Thusoo
>            Assignee: Ashish Thusoo
>
> Add ability to describe nested types.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-62) Add ability to describe nested types

Posted by "Ashish Thusoo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-62?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashish Thusoo updated HIVE-62:
------------------------------

        Fix Version/s: 0.20.0
    Affects Version/s: 0.20.0
         Hadoop Flags: [Reviewed]
               Status: Patch Available  (was: Open)

submit patch.

> Add ability to describe nested types
> ------------------------------------
>
>                 Key: HIVE-62
>                 URL: https://issues.apache.org/jira/browse/HIVE-62
>             Project: Hadoop Hive
>          Issue Type: New Feature
>    Affects Versions: 0.20.0
>            Reporter: Ashish Thusoo
>            Assignee: Ashish Thusoo
>             Fix For: 0.20.0
>
>         Attachments: patch-62.txt, patch-62_2.txt
>
>
> Add ability to describe nested types.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.