[ https://issues.apache.org/jira/browse/SPARK-16894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15646563#comment-15646563 ]
Kapil Singh commented on SPARK-16894: ------------------------------------- The use case is similar to scala collection's take method. So, for example, one of the input columns is an array containing product category hierarchy e.g. [apparel, men, t-shirt, printed, ...] and I'm only interested in first n (say 3) categories. I want a function/expression on DataFrame so that I can get an output column containing only first 3 categories e.g. [apparel, men, t-shirt] > take function for returning the first n elements of array column > ---------------------------------------------------------------- > > Key: SPARK-16894 > URL: https://issues.apache.org/jira/browse/SPARK-16894 > Project: Spark > Issue Type: New Feature > Components: SQL > Reporter: Kapil Singh > > take(inputArray, n) > Returns array containing first n elements of inputArray -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org