Easiest way to do this today is to define a UDF that maps from string to a number.
On Wed, Jul 1, 2015 at 10:25 AM, Mick Davies <michael.belldav...@gmail.com> wrote: > Hi, > > Is there a way to specify a custom order by (Ordering) on a column in Spark > SQL > > In particular I would like to have the order by applied to a currency > column > not to be alpha, but something like - USD, EUR, JPY, GBP etc.. > > I saw an earlier post on UDTs and ordering (which I can't seem to find in > this archive, > > http://mail-archives.us.apache.org/mod_mbox/spark-user/201503.mbox/%3CCAFGcCdWWCFCwVp7+BCaPQ=6uupmyjcbhqyjn9txeu45hjg4...@mail.gmail.com%3E > ), > which is somewhat related to this question. > > Thanks > Mick > > > > -- > View this message in context: > http://apache-spark-user-list.1001560.n3.nabble.com/Custom-order-by-in-Spark-SQL-tp23569.html > Sent from the Apache Spark User List mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@spark.apache.org > For additional commands, e-mail: user-h...@spark.apache.org > >