3
sortとorderBy spark DataFrameの違いは何ですか?コマンド以下SparkでsortとorderBy関数の違いは何ですか
scala> zips.printSchema
root
|-- _id: string (nullable = true)
|-- city: string (nullable = true)
|-- loc: array (nullable = true)
| |-- element: double (containsNull = true)
|-- pop: long (nullable = true)
|-- state: string (nullable = true)
同じ結果を生成:
zips.sort(desc("pop")).show
zips.orderBy(desc("pop")).show