I have a JDBC connection to an Oracle DB. I also have some function f(x) written in Groovy or Scala. For example, f(x) simply returns 2x.
Now my question is: how should I call this f(x) in my Java code, to apply f(x) to all values in a column, and update this column to 2x in the above example?
You can use withColumn api to update the column's values.
If your function is returning a constant lit should be a good choice. You can find a lot of functions too.
You can use
udffunction too asbut
udffunction would need serialization and deserialization column values. So if other functions should be preferred.