What is STREAMTABLE in Hive?

In Hive, we can optimize a query by using STREAMTABLE hint. We can specify it in SELECT query with JOIN. During the map/reduce stage of JOIN, a table data can be streamed by using this hint.

SELECT /*+ STREAMTABLE(table1) */ table1.val, table2.val
FROM table1 JOIN table2 ON (table1.key = table2.key1)

In above query we are using table1 as a stream.

If we do not use STREAMTABLE hint then Hive will stream the right most table in the JOIN query.