Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymo001 committed Oct 13, 2022
1 parent 42d0a1c commit 074b6bc
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ private[offline] object FDSConversionUtils {
values.asScala.toArray
case values: mutable.WrappedArray[Any] =>
if (values.nonEmpty && values(0).isInstanceOf[GenericRowWithSchema]) {
// Assuming the result is returned by SWA feature with groupBy, hence keeping only the
// feature value as an array and dropping the index info.
values.asInstanceOf[mutable.WrappedArray[GenericRowWithSchema]].map(v => v.get(v.size - 1)).toArray
} else {
values.toArray
Expand Down

0 comments on commit 074b6bc

Please sign in to comment.