Hi all, I got an exception like “org.apache.spark.sql.catalyst.analysis.UnresolvedException: Invalid call to dataType on unresolved object” when using some where condition queries. I am using 1.4.0 version spark. But its perfectly working in hive .
Please refer the following query. I have applied date time casting in where clause. Could please help to resolve this exception? SELECT from_unixtime(unix_timestamp(`leavedetails`.`created`,'yyyyMMdd'),'yyyy/MM/dd') AS `leavedetails_created` FROM `default`.`leavedetails` AS leavedetails WHERE (( (from_unixtime(unix_timestamp(`leavedetails`.`created`,'yyyyMMdd'),'yyyy/MM/dd') IN ('2015/01/01','2015/01/02')) AND (NOT(`leavedetails`.`created` IS NULL)))) GROUP BY from_unixtime(unix_timestamp(`leavedetails`.`created`,'yyyyMMdd'),'yyyy/MM/dd') Regards. Ravi