[ https://issues.apache.org/jira/browse/HIVE-18416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jesus Camacho Rodriguez updated HIVE-18416: ------------------------------------------- Attachment: HIVE-18416.01.patch > Initial support for TABLE function > ---------------------------------- > > Key: HIVE-18416 > URL: https://issues.apache.org/jira/browse/HIVE-18416 > Project: Hive > Issue Type: Bug > Components: Parser > Affects Versions: 3.0.0 > Reporter: Jesus Camacho Rodriguez > Assignee: Jesus Camacho Rodriguez > Labels: TODOC3.0 > Attachments: HIVE-18416.01.patch, HIVE-18416.patch > > > Include support for TABLE function derived table. In SQL standard, it is > defined as: > {noformat} > <table function derived table> ::= > TABLE <left paren> <collection value expression> <right paren> > {noformat} > Further, include limited support for its usage as LATERAL derived table. > This will allow Hive to execute queries such as: > {code} > 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); > {code} > 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. -- This message was sent by Atlassian JIRA (v6.4.14#64029)