不支持DataType间隔-Spark SQL [英] DataType interval is not supported - Spark SQL

查看:277
本文介绍了不支持DataType间隔-Spark SQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在AWS EMR上运行查询,并且此行显示查询错误-

I am running a query on AWS EMR and the query errors out on this line -

to_date('1970-01-01', 'YYYY-MM-DD') + CAST(concat(mycolumn, ' seconds') AS INTERVAL)  AS date_col

错误-DataType interval is not supported.(line 521, pos 82)

有人可以帮我吗?

推荐答案

我认为Spark支持间隔关键字.它将用作:

I think Spark supports the interval key word. It would be used as:

to_date('1970-01-01', 'YYYY-MM-DD') + mycolumn * interval '1 second' AS date_col

这篇关于不支持DataType间隔-Spark SQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆