[ https://issues.apache.org/jira/browse/HIVE-1370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871455#action_12871455 ]
Carl Steinbach commented on HIVE-1370: -------------------------------------- You need to use Hive's LATERAL VIEW syntax. See http://wiki.apache.org/hadoop/Hive/LanguageManual/LateralView I agree that the error message is misleading. Perhaps this ticket would be a good place to fix it. > Should be possible to select a primitive column together with UDTF > ------------------------------------------------------------------ > > Key: HIVE-1370 > URL: https://issues.apache.org/jira/browse/HIVE-1370 > Project: Hadoop Hive > Issue Type: Improvement > Reporter: Alex Kozlov > Priority: Minor > > I have a table that contains a primitive type column and an array. For > example 'create table temp (guid string, events array<struct<num:int, > ts:bigint>>)'. I am able to select guid and UDTF separately: > hive> select guid from temp; > and > hive> select explode(events) as event from temp; > What is the reason I can not do: > hive> select guid, explode(events) as event from temp; > FAILED: Error in semantic analysis: UDTF's are not supported outside the > SELECT clause, nor nested in expressions > All other implementations of PIVOT or TRANSPOSE I know do allow that. The > error message is very misleading in any case: I am not using UDTF outside of > select or in an expression. > Thanks, > Alex K -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.