I have this column in my database, called id which contains INTS.
e.g:
{id: 123456}
{id: 234567}
{id: 345678}
{id: 456789}
{id: 567890}
and I need to update these values with it's encrypted values by calling a function encryptId(id). encryptId takes in a LONG and then returns a STRING value
My thought process is to use .withcolumn to replace the current id column with the encrypted value
db.withColumn("id", encryptId(col("id")))
gives me the error
type mismatch. Required: Long, found: column
db.withColumn("id", encryptId("id"))
gives me the error
type mismatch. Required: Long, found: string
Am I doing this incorrectly? :(