selectExpr just uses the SQL parser to interpret the string you give it.
So to get a string literal you would use quotes:
df.selectExpr("*", "'" + time.miliseconds() + "' AS ms")
On Fri, Feb 12, 2016 at 6:19 PM, Andy Davidson <
a...@santacruzintegration.com> wrote:
> I am trying to add a column
I've never done it that way but you can simply use the withColumn method in
data frames to do it.
On 13 Feb 2016 2:19 a.m., "Andy Davidson"
wrote:
> I am trying to add a column with a constant value to my data frame. Any
> idea what I am doing wrong?
>
> Kind regards
>
> Andy
>
>
> DataFrame res