Description
Include support for TABLE function derived table. In SQL standard, it is defined as:
<table function derived table> ::= TABLE <left paren> <collection value expression> <right paren>
Further, include limited support for its usage as LATERAL derived table.
This will allow Hive to execute queries such as:
SELECT tf.col1, tf.col2, tf.col3 FROM TABLE(VALUES('A', 10, 30.0),('B', 20, 30.0)) AS tf(col1, col2, col3); SELECT tf.col1, tf.col2, tf.col3 FROM (SELECT key, value FROM src) t, LATERAL TABLE(VALUES('A', 10, t.key),('B', 20, t.key)) AS tf(col1, col2, col3);
The idea is to rely on AST rewriting for such cases, as TABLE can be implemented using inline UDTF with an array of structs representing the rows in the VALUES clause.
Attachments
Attachments
Issue Links
- blocks
-
HIVE-18450 Support TABLE function in CBO
- Closed
- is related to
-
HIVE-18451 Support UDTF Operator in SimpleFetchOptimizer
- Open
- links to