You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if there was a way to iterate over the columns as Symbols with the appropriate evidence of their existence in the typed dataset, and perhaps some type tagging to ensure the operations for that symbol are type compatible.
My concrete example is the following: I have a dataset for which some columns are String, and want to replace those columns by translated version of their contents. Some (pseudo)code illustrating what I wanted to achieve is
valds=TypedDataset(...)
ds.columns.foldLeft(ds) { (ds, typedColumn) =>
typedColumn match {
casetypedColumn: TypedColumn[String] => ds.withColumnReplaced(typedColumn.symbol, translate(typedColumn))
case _ => ds
}
}
Is that already possible?
Thanks!
The text was updated successfully, but these errors were encountered:
I was wondering if there was a way to iterate over the columns as
Symbol
s with the appropriate evidence of their existence in the typed dataset, and perhaps some type tagging to ensure the operations for that symbol are type compatible.My concrete example is the following: I have a dataset for which some columns are
String
, and want to replace those columns by translated version of their contents. Some (pseudo)code illustrating what I wanted to achieve isIs that already possible?
Thanks!
The text was updated successfully, but these errors were encountered: