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

Hive - Data Types - Complex

asked Experts-976 December 5, 2014 09:10 AM  

Data Types - Complex


1 Answers

answered By Experts-976   0  
  • Structs: the elements within the type can be accessed using the DOT (.) notation. For example, for a column c of type STRUCT {a INT; b INT} the a field is accessed by the expression c.a

  • Maps (key-value tuples): The elements are accessed using ['element name'] notation. For example in a map M comprising of a mapping from 'group' -> gid the gid value can be accessed using M['group']

  • Arrays (indexable lists): The elements in the array have to be in the same type. Elements can be accessed using the [n] notation where n is an index (zero-based) into the array. For example for an array A having the elements ['a', 'b', 'c'], A[1] returns 'b'.

   add comment

Your answer

Join with account you already have



 Write A Tutorials
Online-Classroom Classes

  1 person following this question

  1 person following this tag

  Question tags

hive × 1

Asked 3 years and 5 days ago ago
Number of Views -295
Number of Answers -1
Last updated
3 years and 5 days 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!