Df group (" a "). The Max error (" b ")
Have a conversion API? Can you give me an example. Thanks
CodePudding user response:
Max method can only accept numeric columns, try HiveContext. SQLCodePudding user response:
Cast ()Df. Select (df (" colA ") cast (" int "))
CodePudding user response:
Max method only accept numeric type parameters, Int, Long, etc., if it is a String, Date, Timestamp type words to use agg (Max (" b "))