You can do max on a struct to get the max value for the first column, along with the values for other columns in the row (an argmax)
Here is an example <https://databricks-prod-cloudfront.cloud.databricks.com/public/4027ec902e239c93eaaa8714f173bcfc/1023043053387187/3170497669323442/2840265927289860/c072bba513.html> in Spark 1.6. On Thu, Feb 25, 2016 at 8:24 AM, Ashok Kumar <ashok34...@yahoo.com.invalid> wrote: > Hi, > > How can I make that work? > > val d = HiveContext.table("table") > > select * from table where ID = MAX(ID) from table > > Thanks >