spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 崔苗 <cuim...@danale.com>
Subject Re:Re: how to use lit() in spark-java
Date Mon, 26 Mar 2018 02:32:48 GMT
It works,thanks

在 2018-03-23 21:33:41,Anil Langote <anillangote0106@gmail.com> 写道:
You have import functions 


dataset.withColumn(columnName,functions.lit("constant"))


Thank you
Anil Langote


Sent from my iPhone

_____________________________
 From: 崔苗 <cuimiao@danale.com>
 Sent: Friday, March 23, 2018 8:33 AM
 Subject: how to use lit() in spark-java
 To: <user@spark.apache.org>


Hi Guys, 

I want to add a constant column to dataset by lit function in java, like that:
  dataset.withColumn(columnName,lit("constant"))
 but it's seems that idea coundn't found the lit() function,so how to use lit() function in
java?

 thanks for any reply













Mime
View raw message