How to sort the Int type instead of the String type when sparksql operates the csv sort

Dataset<Row> df = spark.read().format("csv").load("C:\\develop\\intellij-workspace\\SparkSqlDemos\\resources\\down.csv");
df.createOrReplaceTempView("down");
Dataset<Row> dfSQL = spark.sql("SELECT * FROM down order by _c3");
//CAST
//Dataset<Row> dfSQL = spark.sql("SELECT * FROM down order by CAST(_c3 as SIGNED)");

how to sort by Int type

Mar.12,2021

.option("inferSchema", true)

see the org.apache.spark.sql.DataFrameReader document. By changing the inferSchema option in the option method to true, the data type is pushed to a numeric value, instead of defaulting to String

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3598f-2bf9d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3598f-2bf9d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?