Mam kwerendy Hive jakHive: SELECT AS i GROUP BY
SELECT Year, Month, Day, Hours, Minutes,
cast((cast(Seconds as int)/15) as int)*15
AS secondMod, Count(*) AS PerCount FROM LoggerTable
GROUP BY Year, Month, Day, Hours, Minutes, secondMod
ORDER BY PerCount;
powyższe kwerenda nie powiedzie się z powodu błędu
FAILED: Error in semantic analysis: line 1:175 Invalid Table Alias or Column Reference secondMod
'LoggerTable' jest ulu tabela ze wszystkimi kolumnami typu string .
Jakiekolwiek obejście tego problemu?
Jest to ogromny problem, jeśli chcesz zdefiniować bardzo skomplikowany "SELECT" i chcesz go użyć w swoich "WHERE", "GROUP BY" i "ORDER BY". Istnieje pewne obejście problemu http://stackoverflow.com/questions/26028767/why-cant-hive-recognize-alias-named-in-select-part – ubershmekel