No, because insert...values writes the values to a local file, builds a temp table over that local file, then rewrites the query to "insert into X select from tmptable". The expressions aren't evaluated before being written to the file. More work would need to be done to write the "pre-expression" data to the file and then have the query re-write handle inserting the expressions back into the insert statement.

Alan.

Jason Dere <mailto:jd...@hortonworks.com>
December 19, 2014 at 10:55
There are UDFs to create complex types, would something like this work?
    INSERT .. VALUES select map('key1', 'val1', 'key2', 'val2');





CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You.
Skyler Beckman <mailto:skyler.beck...@livetv.net>
December 19, 2014 at 8:50

Thanks

*From:*Alan Gates [mailto:ga...@hortonworks.com]
*Sent:* Friday, December 19, 2014 11:35 AM
*To:* user@hive.apache.org
*Subject:* Re: Hive 0.14 SQL Inserts Complex Data Types

Hive does not support literals for complex types, so it is not possible to use them in INSERT...VALUES clauses.

Alan.


*Skyler Beckman* <mailto:skyler.beck...@livetv.net>

December 17, 2014 at 9:59

With 0.14 is it possible to use the INSERT…VALUES statement to insert data into a table with complex types like arrays, maps, etc? We will never be loading data from a file which is why I ask.

--

Sent with Postbox <http://www.getpostbox.com>


CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You.

Alan Gates <mailto:ga...@hortonworks.com>
December 19, 2014 at 8:35
Hive does not support literals for complex types, so it is not possible to use them in INSERT...VALUES clauses.

Alan.


Skyler Beckman <mailto:skyler.beck...@livetv.net>
December 17, 2014 at 9:59

With 0.14 is it possible to use the INSERT…VALUES statement to insert data into a table with complex types like arrays, maps, etc? We will never be loading data from a file which is why I ask.


--
Sent with Postbox <http://www.getpostbox.com>

--
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You.

Reply via email to