答案 0 :(得分:0)
要在Apache Spark中选择带有连字符-
的列,请使用以下语法:
对于Apache Spark 1.x或更低版本:
sqlContext.sql("select max(`F-Measure`) from fMeasure_table")
对于Apache Spark 2.x或更高版本:
spark.sql("select max(`F-Measure`) from fMeasure_table")
以下是类似问题的链接:How to escape column names with hyphen in Spark SQL