下面这一段代码,之前没有注意都是去除tab健的。
注意 从 t2.first_active_date 开始是用的"tab"。
hive<<ENDOFINPUT;
--------------------------- Below are HIVE SQL scripts --------------------------
SELECT
coalesce(t2.imei,t1.imei)
,coalesce(t2.app_name,t1.app_name)
,coalesce(t2.first_active_date,t1.dt)
,coalesce(t2.first_app_version,t1.first_app_version)
,coalesce(t1.dt,t2.last_active_date)
,coalesce(t1.last_app_version,t2.last_app_version)
,t2.first_active_date
,t1.dt
,t2.last_active_date
结果提示“Logging initialized using configuration in jar:file:/usr/local/apache-hive-1.2.1-bin/lib/hive-common-1.2.1.jar!/hive-log4j.properties
hive> --------------------------- Below are HIVE SQL scripts --------------------------
> SELECT
> coalesce(t2.imei,t1.imei)
> ,coalesce(t2.app_name,t1.app_name)
> ,coalesce(t2.first_active_date,t1.dt)
> ,coalesce(t2.first_app_version,t1.first_app_version)
> ,coalesce(t1.dt,t2.last_active_date)
> ,coalesce(t1.last_app_version,t2.last_app_version)
> Display all 475 possibilities? (y or n)
> ame”
说明此处异常,tab改为空格后,ok, 大功告成。