Home > Software > BIGDATA > Hive
Interview Questions   Tutorials   Discussions   Programs   Videos   

Hive - What are the complex datatypes in Hive?

    Next Topic



517
views
asked marvit January 2, 2015 07:46 PM  

Complex Data Types


           

1 Answers



 
answered By marvit   0  
TYPE DESCRIPTION LITERAL SYNTAX EXAMPLES
STRUCTAnalogous to a C struct or an “object”. Fields can be accessed using the “dot” notation. For example, if a column name if of type STRUCT {first STRING; last STRING}, then the first name field can be referenced using name.first.struct('John', 'Doe')
MAPA collection of key-value tuples, where the fields are accessed using array notation, e.g., [‘key’]. For example, if a column name is of type MAP with key->value pairs 'first'->'John' and 'last'->'Doe', then the last name can be referenced using name['last'].map('first', 'John', 'last', 'Doe')
ARRAYLists of the same type that are indexable using zero-based integers. For example, if a column name is of type ARRAY of strings with the value ['John', 'Doe'], then the second element can be referenced using name[1].array('John', 'Doe')
flag   
   add comment

Your answer

Join with account you already have

FF

Preview

 Write A Tutorials
Online-Classroom Classes
www.writeabc.com


  1 person following this question

  1 person following this tag

  Question tags

hive × 1

Asked 2 years and 11 months ago ago
Number of Views -517
Number of Answers -1
Last updated
2 years and 11 months ago ago

Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert