Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.
The "Hive/LanguageManual/UDF" page has been changed by PhiloVivero.
The comment on this change is: Slight changes to make more coherent between problem query
and solution query..
http://wiki.apache.org/hadoop/Hive/LanguageManual/UDF?action=diff&rev1=62&rev2=63
--------------------------------------------------
You will get an error:
{{{
- FAILED: Error in semantic analysis: line 1:86 Invalid Table Alias or Column Reference fc
+ FAILED: Error in semantic analysis: line 1:69 Invalid Table Alias or Column Reference fc
}}}
Because you are not able to GROUP BY or SORT BY a column on which a function has been applied.
However, you can reformulate this query with subqueries:
{{{
- select sq.col,count(*) from (select f(column) as col) sq group by sq.col
+ select sq.fc,count(*) from (select f(col) as fc) sq group by sq.fc
}}}
|