Oh, I found it out. Need to import sql.functions._

Then I can do

  table.select(lit("2015-04-22").as("date"))


Jianshi


On Wed, Apr 22, 2015 at 7:27 PM, Jianshi Huang <jianshi.hu...@gmail.com>
wrote:

> Hi,
>
> I want to do this in Spark SQL DSL:
>
>   select '2015-04-22' as date
>   from table
>
> How to do this?
>
> --
> Jianshi Huang
>
> LinkedIn: jianshi
> Twitter: @jshuang
> Github & Blog: http://huangjs.github.com/
>



-- 
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/

Reply via email to