We can use the following function to covert a single integer value.
val x=100
Integer.toString(x, 16).toUpperCase
But how to apply it to a integer column to generate a new column with hex string? thanks!
The below method does not work.
testDF = testDF.withColumn("data_hex_string", Integer.toString(testDF("data"), 16).toUpperCase)