becustom
domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init
action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home4/joyplace/public_html/wp-includes/functions.php on line 6114wordpress-seo
domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init
action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home4/joyplace/public_html/wp-includes/functions.php on line 6114LATERAL VIEW is a very powerful concept in Hive. It is used when we have to work with data with complex types. Let\u2019s see this with an example.<\/p>\n
Let\u2019s say we have an employee table with employee name and an Array of department ids the employee belongs to.<\/span><\/p>\n \u00a0select * from employee;<\/span><\/p>\n With the data above we would like to count the number of departments the employee belongs to. The output should look like below.<\/span><\/p>\n This is an easy problem to solve if the data we have is not nested. But with our data the dept_list is an Array of integers providing the list of departments the employee belongs to.<\/span><\/p>\n+-----------------+---------------------+--+\n| employee.ename\u00a0 | employee.dept_list\u00a0 |\n+-----------------+---------------------+--+\n| Tom \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 | [20]\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 |\n| Jerry \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 | [10,20] \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 |\n| Riley \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 | [20,30,40]\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 |\n+-----------------+---------------------+--+<\/pre>\n
+--------+------+--+\n| ename\u00a0 | _c1\u00a0 |\n+--------+------+--+\n| Jerry\u00a0 | 2\u00a0 \u00a0 |\n| Riley\u00a0 | 3\u00a0 \u00a0 |\n| Tom\u00a0 \u00a0 | 1\u00a0 \u00a0 |\n+--------+------+--+<\/pre>\n
Solution<\/span><\/h2>\n